bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23476: 25.0.93; Visiting C files on master signals an error


From: Alan Mackenzie
Subject: bug#23476: 25.0.93; Visiting C files on master signals an error
Date: Sat, 7 May 2016 20:40:22 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

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@gnu.org>
> > Cc: 23476@debbugs.gnu.org, andrewjmoreton@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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]