bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12188: 24.1; awk-mode eletric { incorrectly inserts newline


From: Alan Mackenzie
Subject: bug#12188: 24.1; awk-mode eletric { incorrectly inserts newline
Date: Wed, 15 Aug 2012 14:42:33 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]