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: Wed, 15 Aug 2012 14:42:33 +0000 Message-ID: <20120815144233.GA4016@acm.acm> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1345042045 28298 80.91.229.3 (15 Aug 2012 14:47:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2012 14:47:25 +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 Wed Aug 15 16:47:26 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 1T1esX-0006u3-2g for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Aug 2012 16:47:25 +0200 Original-Received: from localhost ([::1]:34729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1esW-0006uY-49 for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Aug 2012 10:47:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1esT-0006oX-B6 for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2012 10:47:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1esS-0002lV-9e for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2012 10:47:21 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1esQ-0002kn-AG; Wed, 15 Aug 2012 10:47:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T1f0r-0004zv-Ol; Wed, 15 Aug 2012 10:56:01 -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: Wed, 15 Aug 2012 14:56:01 +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, 12188@debbugs.gnu.org Original-Received: via spool by 12188-submit@debbugs.gnu.org id=B12188.134504252819168 (code B ref 12188); Wed, 15 Aug 2012 14:56:01 +0000 Original-Received: (at 12188) by debbugs.gnu.org; 15 Aug 2012 14:55:28 +0000 Original-Received: from localhost ([127.0.0.1]:59216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1f0K-0004z7-0M for submit@debbugs.gnu.org; Wed, 15 Aug 2012 10:55:28 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:20472 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1f0H-0004yy-H3 for 12188@debbugs.gnu.org; Wed, 15 Aug 2012 10:55:26 -0400 Original-Received: (qmail 19560 invoked by uid 3782); 15 Aug 2012 14:46:40 -0000 Original-Received: from acm.muc.de (pD955724F.dip.t-dialin.net [217.85.114.79]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 15 Aug 2012 16:46:38 +0200 Original-Received: (qmail 4046 invoked by uid 1000); 15 Aug 2012 14:42:33 -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:63193 Archived-At: Hello, Leo, On Mon, Aug 13, 2012 at 08:32:18AM +0800, Leo wrote: > 1. emacs -q x.awk > 2. C-c C-a to enable auto-newline mode > 3. Type: NR==3 { > You should see { starts at a new line instead of following NR==3, i.e. { > helps creating incorrect awk programs. The current assumption is that the "{" starts the action for the pattern "NR==3". Although the implicit action (i.e., print the line) isn't rare, having such a line followed by the implicit pattern (i.e., match everything) is surely uncommon enough not to make it the default assumption. I think this default is fine as it is. It is, of course, possible to configure auto newlines to behave as you suggest. > Leo -- Alan Mackenzie (Nuremberg, Germany).