From: Guido Van Hoecke <guivho@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Electric braces
Date: Wed, 19 Sep 2012 19:11:55 +0200 [thread overview]
Message-ID: <CAEySM9HMKrH=XhGMdgEzkT61obU1mdR=Oqw9CVcF6pBw+YUBXQ@mail.gmail.com> (raw)
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!
next reply other threads:[~2012-09-19 17:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 17:11 Guido Van Hoecke [this message]
2012-09-19 17:17 ` Electric braces Константин Куликов
2012-09-19 17:33 ` Pascal J. Bourguignon
-- strict thread matches above, loose matches on Subject: below --
2012-09-19 18:22 Dmitry Gutov
[not found] <mailman.9321.1348074746.855.help-gnu-emacs@gnu.org>
2012-09-20 3:47 ` 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEySM9HMKrH=XhGMdgEzkT61obU1mdR=Oqw9CVcF6pBw+YUBXQ@mail.gmail.com' \
--to=guivho@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.