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
Message #8 received at 35454 <at> debbugs.gnu.org (full text, mbox):
Hello, Mauro.
On Sat, Apr 27, 2019 at 12:57:05 -0300, Mauro Aranda wrote:
> Hello.
> Steps to reproduce:
> 1) emacs -Q
> 2) Open up a new .c file:
> C-x C-f test.c
> 3) Type this text:
> #define FOO \
> /* Some comms. */ \
> struct foobar my_foo; \
> struct foobar my_bar;
> The first struct foobar after the comment is not fontified as the second
> one. That is, the second foobar has face font-lock-type-face, and
> my_bar has face font-lock-variable-name-face, but the first foobar and
> my_foo don't get those face values.
> I actually bumped into this issue while visiting the emacs source file
> src/editfns.c. In that file, search for "#define EXTRA_CONTEXT_FIELDS"
> and the problem should be evident.
Thanks! I can reproduce this easily, and will look into it in the next
day or two.
Of interest is the fact that if FOO is given an empty argument list
(i.e. one writes
#define FOO() \
...
), the bug doesn't happen.
> I can reproduce it with the latest Emacs 26, as well as with the latest
> master:
> Repository revision: 8dc00b2f1e6523c634df3e24379afbe712a32b27
> Repository branch: master
> Best regards,
> Mauro.
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 6 years and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.