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

From: Alan Mackenzie <[email-masked]>
Date: Fri, 17 Aug 2012 21:05:09 +0000

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

> Leo

-- 
Alan Mackenzie (Nuremberg, Germany).