From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Guido Van Hoecke Newsgroups: gmane.emacs.help Subject: Electric braces Date: Wed, 19 Sep 2012 19:11:55 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1348074758 7855 80.91.229.3 (19 Sep 2012 17:12:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2012 17:12:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 19 19:12:39 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TENpC-00009J-DA for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Sep 2012 19:12:34 +0200 Original-Received: from localhost ([::1]:55146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TENp7-0001ht-UQ for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Sep 2012 13:12:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TENp1-0001ZM-GH for help-gnu-emacs@gnu.org; Wed, 19 Sep 2012 13:12:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TENov-0006jO-Lh for help-gnu-emacs@gnu.org; Wed, 19 Sep 2012 13:12:23 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:42853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TENov-0006j0-H9 for help-gnu-emacs@gnu.org; Wed, 19 Sep 2012 13:12:17 -0400 Original-Received: by iaby26 with SMTP id y26so917730iab.0 for ; Wed, 19 Sep 2012 10:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Y7mCMoVHCbn6FhWpUCc/0CegCaE8YRiryltDS7utL80=; b=f5NVf9Pywhdxbe7chjndGxX2wJQ+4Fs+Fejs5HuoA837J+nurYz+KI91OSzEWSH0av qLP9EYDCHGTsMAxQC6LXeHiuHJ+HdiTPYFLD7Fu42SrtZgNSItERIfnyDnN2UTO3IgCi wExj3xZajE1uFZl5MzMKfykFURxvlzoHO6BC1a2yYF5q2lr4+Ff+ogyNSdBtYIBhWQ4T 0Pn1LWoEiGqu8gJ4NMPALjMhUFpo18/bla9T62Her46WQ7uiWtjabeWkiOUx4znEaMU5 2Wa1rCKPRtOC3g8KNpVCkTCF5e0HK3E5C3PevquixRI/YpJlSF5BqIVcR9f+hRKrhjjg aOnA== Original-Received: by 10.50.159.201 with SMTP id xe9mr3385660igb.63.1348074736585; Wed, 19 Sep 2012 10:12:16 -0700 (PDT) Original-Received: by 10.64.11.103 with HTTP; Wed, 19 Sep 2012 10:11:55 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86834 Archived-At: 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!