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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 09 May 2016 19:52:08 +0300

> Date: Mon, 9 May 2016 11:07:13 +0000
> Cc: [email-masked]
> From: Alan Mackenzie <[email-masked]>
> 
> > But the IF_LINT part is AFAIU the _only_ part of the configuration
> > that the user needs to supply.  All the rest, including the forms to
> > evaluate, doesn't have to be in file-local variables.  Right?
> 
> Right.  I've amended C(etc.) Mode to use the new :after-hook parameter
> to define-derived-mode which I committed yesterday.  The eval form which
> used to be in .dir-locals.el is now run by C Mode after the mode hooks
> (and file/dir local variables stuff) have been done.

Thanks.

> However, visiting a master C source file using the emacs-25 branch would
> still ask the question.

Why, because Emacs 25 doesn't know about the new variable and its safe
values?  Or for some other reason?

> One way to get round this would be to add the safe-local-variable
> stuff into emacs-25, but nobody wants to change emacs-25 at this
> late stage.

Adding a variable that is not used for anything but declaring its safe
values should be OK, I think.

> Just how bad would it be to get the question about unsafe local
> variables when visiting master C files from emacs-25 emacs -Q?

It's better, but still an annoyance.  And if the solution in non-Q
sessions is to accept the variable as safe anyway, then adding the
variable instead for the same purpose is not different, and should be
"safe" (pun intended ;-).