unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: Electric braces
@ 2012-09-19 18:22 Dmitry Gutov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2012-09-19 18:22 UTC (permalink / raw)
  To: zxnotdead; +Cc: help-gnu-emacs

Константин Куликов <zxnotdead@gmail.com> writes:

 > google autopair.el

Why google? Here's the home page: http://code.google.com/p/autopair/

And yes, it's the most popular package for this purpose.

I especially like the newline behavior (the fourth bullet point).



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Electric braces
@ 2012-09-19 17:11 Guido Van Hoecke
  2012-09-19 17:17 ` Константин Куликов
  2012-09-19 17:33 ` Pascal J. Bourguignon
  0 siblings, 2 replies; 8+ messages in thread
From: Guido Van Hoecke @ 2012-09-19 17:11 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

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,




Guido

--
Expect a letter from a friend who will ask a favor of you.

http://vanhoecke.org ... and go2 places!



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-21 16:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.9321.1348074746.855.help-gnu-emacs@gnu.org>
2012-09-20  3:47 ` Electric braces Stefan Monnier
2012-09-20 14:58   ` Guido Van Hoecke
     [not found]   ` <mailman.9367.1348153122.855.help-gnu-emacs@gnu.org>
2012-09-20 17:38     ` Stefan Monnier
2012-09-21 16:56       ` João Távora
2012-09-19 18:22 Dmitry Gutov
  -- strict thread matches above, loose matches on Subject: below --
2012-09-19 17:11 Guido Van Hoecke
2012-09-19 17:17 ` Константин Куликов
2012-09-19 17:33 ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).