GNU bug report logs -
#23476
25.0.93; Visiting C files on master signals an error
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat, 7 May 2016 07:28:01 UTC
Severity: normal
Found in version 25.0.93
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, Eli.
On Sat, May 07, 2016 at 10:30:39PM +0300, Eli Zaretskii wrote:
> > Date: Sat, 07 May 2016 21:57:50 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > Cc: 23476 <at> debbugs.gnu.org, andrewjmoreton <at> gmail.com
> > Let's try to find a solution that doesn't involve unsafe values.
> One way is to turn on by default the feature that fontifies these
> macros correctly. Why does it have to be off by default?
The feature is dependent on _configuration_: the '("IF_LINT") is that
configuration. After reading the list of "noise macros", CC Mode has to
turn them into a regexp with `regexp-opt'. This is what the `eval' part
of the configuration is for.
We could make `c-noise-macro-with-parens-names' (and
`c-noise-macro-names') safe local variables (after all, they do nothing
more than set regexps used for fontification).
The call (eval . (c-make-noise-macro-regexps)) is more problematic; the
eval "variable" is always going to be unsafe - it's got to be. One
possible solution would be to enhance `define-derived-mode' with an
:after-hook argument (define-minor-mode already has one), a lisp form
which gets evaluated after the mode hooks have been run.
`c-make-noise-macro-regexps' could be put into this form.
I've reverted the change to .dir-locals.el which caused the problem.
This should take the pressure off, so that we can find a good solution.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 9 years and 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.