Subject: Re: bug#36801: CC Mode 5.34 (C/*l); Weird fontification in brackets in C++ Mode

From: Alan Mackenzie <[email-masked]>
Date: Fri, 2 Aug 2019 13:06:30 +0000

Hello, Richard.

I've committed the patch, and I'm closing the bug.

On Wed, Jul 24, 2019 at 20:51:47 +0100, Richard Copley wrote:
> Package: cc-mode

> With these buffer contents:

> order[x];
> origin[y];
> counterpane[z];

> ... "x" and "y" are highlighted as types [EDIT: keywords],
> and "z" is not.

> Reproduced below is the story so far, which comes after a discussion
> of unrelated matters at bug#36397.

> On Tue, 23 Jul 2019 at 11:40, Alan Mackenzie <[email-masked]> wrote:

>     Hello again, Richard.

>     On Mon, Jul 22, 2019 at 20:47:22 +0100, Richard Copley wrote:

>     [ .... ]

>     > 3. (This one's reproducible and 'stable' -- it's dependent only
>     > on the current buffer contents, and not on the path that got us
>     > there.) With these buffer contents:

>     > order[x];
>     > origin[y];
>     > counterpane[z];

>     > ... "x" and "y" are highlighted as types, and "z" is not
>     > (expected: none of the three subscripts are
>     > highlighted). There's apparently something special about the
>     > identifiers "order" and "origin".

>     OK, I've tracked this one down to a regexp not testing for end of
>     word.

>     I'm pretty sure the following patch fixes it, but would you please
>     do the usual with it anyway.  As this changes a Lisp macro, the
>     entire CC Mode needs to be rebuilt after patching.

>     Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).