Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th August 2012, 10:46 AM
Adunaic's Avatar
Adunaic Offline
Registered User
 
Join Date: Mar 2009
Location: Lancaster, UK
Posts: 883
linuxfirefox
emacs and bracket matching

No idea where to begin looking for this one, so any suggestions, tips, tests etc just say.

I have bracket matching enabled in emacs. Evey so often i (in c++ mode) it decides that "<" and ">" are brackets that need matching and it then screws up all the indentations etc. I cannot see why it does this.

Example :
Code:
	struct_Converted.vMEt > (map_decayTypes[tString_decayType]).varDouble_MEtCut &&
	struct_Converted.vEtRelIso40_2 < (map_decayTypes[tString_decayType]).varDouble_EtRelIso40_2Cut &&
	struct_Converted.vRelWeight_Jet1 >  (map_decayTypes[tString_decayType]).varDouble_RelWeight_Jet1
this code started off fine, emacs saw the "</>" (on lines 2 and 3) as greater than and less than symbols. I then copied and pasted it somewhere else in the code (C-k, C-y), and emacs decided they were now brackets. If I delete them and add them back, line 2 first and then line 3 it is fine again and they are not treated as brackets. If I add back line 3 and then line 2's they are treated as brackets.

Any thoughts? It is driving me crazy.
Reply With Quote
  #2  
Old 9th August 2012, 05:46 PM
normvcr Offline
Registered User
 
Join Date: Aug 2005
Posts: 50
linuxfirefox
Re: emacs and bracket matching

As a matter of style, I would suggest putting brackets around the inner logical terms:

Code:
( A > B ) &&
( C < D ) &&
( E > F )
I, personally, find the code more readable, and it should also make it easier for emacs to parse (but I have not tested it :-) ).
Reply With Quote
  #3  
Old 10th August 2012, 03:21 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,623
linuxfedorafirefox
Re: emacs and bracket matching

I'm not seeing that problem in C++ mode in Emacs on my F17 system. How did you enable bracket matching? There should be something in your ~/.emacs file about that. Could you post it? All I have in mine about bracket matching is this:
Code:
(show-paren-mode t)
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
Reply With Quote
  #4  
Old 10th August 2012, 08:48 PM
Adunaic's Avatar
Adunaic Offline
Registered User
 
Join Date: Mar 2009
Location: Lancaster, UK
Posts: 883
linuxfirefox
Re: emacs and bracket matching

Cheers. I have cleared everything out of my .emacs file except for
Code:
(show-paren-mode t)
It is still broken on my Fedora machine. (It works on my SL5 machine)
Reply With Quote
Reply

Tags
bracket, emacs, matching

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How do I mark a thread as bracket SOLVED? m1boli Suggestions & Feedback 2 29th June 2011 09:46 PM
Latest Emacs v Fedora Emacs olwe Using Fedora 7 3rd May 2011 06:59 PM
How to set emacs color-theme from .emacs file? mohan.10 Programming & Packaging 3 9th November 2010 09:58 PM
Pattern Matching petervoldon Using Fedora 3 17th October 2008 10:19 AM


Current GMT-time: 05:38 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat