GNU bug report logs -
#35454
26.2.50; CC-Mode fontification fails inside macro
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Sat, 27 Apr 2019 16:12:02 UTC
Severity: normal
Found in version 26.2.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello again, Mauro.
On Thu, May 02, 2019 at 08:57:14 +0000, Alan Mackenzie wrote:
> On Wed, May 01, 2019 at 19:31:48 -0300, Mauro Aranda wrote:
> > Alan Mackenzie <acm <at> muc.de> writes:
> > I've applied the patch and tried the recipe I provided, and it works fine.
> > However, when I visit editfns.c and search for EXTRA_CONTEXT_FIELDS,
> > like I said in my report, I see the following problem with this variables:
> > struct buffer *buffer_a;
> > struct buffer *buffer_b;
> > unsigned char *deletions;
> > unsigned char *insertions;
> > All but deletions have face font-lock-variable-name-face.
[ .... ]
> The problem with "deletions" seems to be triggered by the 2-line comment
> in the macro not having a backslash escaping the \n. In nearly 30 years
> hacking C, I've never seen this before, and didn't even know it was
> valid syntax. However, this means at least four very commonly used
> functions (c-beginning-of-macro, c-end-of-macro, c-forward-sws, and
> c-backward-sws) are going to have to be amended to deal with it, and
> this is inevitably going to make CC Mode slower. :-(
I've just committed a fix to multiline comments in macros not having
escaped newlines. This seems to solve the problem with the variable
"deletions". That should be half the battle won. As usual, please feel
free to test it for me.
In the end, it didn't make CC Mode more than around 0.5% slower.
I haven't yet tried combining yesterday's patch with the fix I've just
committed, but if we're lucky, the two together might solve the entire
bug.
[ .... ]
> > Best regards,
> > Mauro.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 6 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.