[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Electric braces

From: Guido Van Hoecke
Subject: Electric braces
Date: Wed, 19 Sep 2012 19:11:55 +0200


When using 'electric braces' in Visual Studio, MonoDevelop and other
tools, I like the behaviour where the closing brace is auto-detected.

(In the example, I show the insertion point as a bar)
If I type

if (|

the screen shows

if (|)

I then key in my test expression, say isFalse (or whatever):

if (isFalse|)

At this point, Visual studio and MonoDevelop realise that the next ')'
key I hit, really represents the ')' which is already there. It does not
add an additional ')' :

if (isFalse)|

But in Emacs, currently using cperl, but also when using c#-mode, or
IIRC ruby-mode, emacs does add an additional ')' which leads to
following erroneous code:

if (isFalse)|)

I am pretty cinfident that Emacs can mimic the VS/MD behaviour. I just
did not find yet how to request it from good old Emacs.

Thanks in advance for any suggestions,


Expect a letter from a friend who will ask a favor of you. ... and go2 places!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]