Subject: bug#13541: 24.2.92; awk-mode: wrong font locking regexp literals

From: Alan Mackenzie <[email-masked]>
Date: Thu, 24 Jan 2013 22:16:04 +0000

Hi, Glenn,

On Thu, Jan 24, 2013 at 01:28:33PM -0500, Glenn Morris wrote:
> Leo Liu wrote:

> > In an awk buffer having the following text:

> > #--BEGIN--
> > NF { /xyz/ }

> > NF {
> >     /xyz/
> > }
> > #--END--

> > I have the second regexp properly font-locked but not the first one.

> Do you have an example of an actual useful awk script showing the issue,
> because this one seems like a pointless no-op?

This is a real bug, perhaps not a difficult one.  "/regexp/" is an
expression with value 1 iff the current input line matches the regexp.
So a line like

    NF { print /xyz/ }

is perfectly legitimate, printing 1 if there's an "xyz" on the line.

I'm looking at this bug at the moment.

-- 
Alan Mackenzie (Nuremberg, Germany).