GNU bug report logs - #12188
24.1; awk-mode eletric { incorrectly inserts newline

Previous Next

Packages: emacs, cc-mode;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Mon, 13 Aug 2012 00:42:01 UTC

Severity: minor

Found in version 24.1

Done: Leo <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 12188 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Leo <sdl.web <at> gmail.com>
Cc: bug-cc-mode <at> gnu.org, 12188 <at> debbugs.gnu.org
Subject: Re: bug#12188: 24.1; awk-mode eletric { incorrectly inserts newline
Date: Wed, 15 Aug 2012 14:42:33 +0000
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).




This bug report was last modified 12 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.