From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#12188: 24.1; awk-mode eletric { incorrectly inserts newline Date: Fri, 17 Aug 2012 21:05:09 +0000 Message-ID: <20120817210509.GA4270@acm.acm> References: <20120815144233.GA4016__1127.2007170648$1345042054$gmane$org@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1345237814 6946 80.91.229.3 (17 Aug 2012 21:10:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2012 21:10:14 +0000 (UTC) Cc: 12188@debbugs.gnu.org To: Leo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 17 23:10:14 2012 Return-path: Envelope-to: geb-bug-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 1T2To5-0002ng-5h for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 23:10:13 +0200 Original-Received: from localhost ([::1]:45520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2To3-00032L-Vu for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2012 17:10:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2To0-0002we-Pv for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 17:10:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2Tnz-0008G3-Ux for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2012 17:10:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2Tny-0008C3-5h; Fri, 17 Aug 2012 17:10:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T2Twc-0004uF-GT; Fri, 17 Aug 2012 17:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 17 Aug 2012 21:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12188 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-cc-mode@gnu.org, Glenn Morris , 12188@debbugs.gnu.org Original-Received: via spool by 12188-submit@debbugs.gnu.org id=B12188.134523830118811 (code B ref 12188); Fri, 17 Aug 2012 21:19:02 +0000 Original-Received: (at 12188) by debbugs.gnu.org; 17 Aug 2012 21:18:21 +0000 Original-Received: from localhost ([127.0.0.1]:35942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2Tvw-0004tL-QF for submit@debbugs.gnu.org; Fri, 17 Aug 2012 17:18:21 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:30827 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T2Tvu-0004tC-6N for 12188@debbugs.gnu.org; Fri, 17 Aug 2012 17:18:19 -0400 Original-Received: (qmail 25730 invoked by uid 3782); 17 Aug 2012 21:09:19 -0000 Original-Received: from acm.muc.de (pD951BEC6.dip.t-dialin.net [217.81.190.198]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 17 Aug 2012 23:09:17 +0200 Original-Received: (qmail 4370 invoked by uid 1000); 17 Aug 2012 21:05:09 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63255 Archived-At: Hello, Leo and Glenn. On Thu, Aug 16, 2012 at 06:44:27AM +0800, Leo wrote: > On 2012-08-15 22:42 +0800, Alan Mackenzie wrote: > > The current assumption is that the "{" starts the action for the pattern > > "NR==3". I got confused by the "should" in your original report. Sorry. Yes, it is a bug, and thanks for the report. > syntax after NR==3 is not recognised as `defun-open' which causes { to > be inserted in a new line. I think there is a bug somewhere (probably > c-guess-basic-syntax) regarding this. In AWK Mode, the recognition of a beginning-of-defun (for C-M-a) is done heuristically. c-guess-b-s can't detect an AWK defun-open. Which all means the solution will be messy and heuristic too. . > Leo -- Alan Mackenzie (Nuremberg, Germany).