emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Make byte-compile-error-on-warn a safe variable for file com


From: Noam Postavsky
Subject: Re: [PATCH] Make byte-compile-error-on-warn a safe variable for file compilation
Date: Fri, 5 Jan 2018 07:05:12 -0500

On Fri, Jan 5, 2018 at 1:17 AM, Robert Cochran
<address@hidden> wrote:

> I somehow came to the conclusion that the way I did it was the simplest
> and cleanest to me. I noticed that `safe-local-variable-values' is nil
> by default and I took that as a hint (rightly or wrongly) to not touch
> the value directly. I was also aiming to prevent easily tampering with
> the variable, again, however right or wrong that particular decision
> seems to you.

Okay, I think preventing easy tampering (by the user) is not a useful goal.

> On that topic, since `safe-local-variable-values' is nil by default,
> where is it exactly that you would recommend I add this variable? A few
> quick greps didn't give me any clear ideas.

See `(elisp) File Local Variables':

   You can specify safe values for a variable with a
`safe-local-variable' property.  The property has to be a function of
one argument; any value is safe if the function returns non-`nil' given
that value.  Many commonly-encountered file variables have
`safe-local-variable' properties; these include `fill-column',
`fill-prefix', and `indent-tabs-mode'.  For boolean-valued variables
that are safe, use `booleanp' as the property value.

>> Solving Bug#4837 would be helpful for this, as currently there is no
>> practical way to fix/suppress the obsolete warnings in the code that
>> remains to support the obsolete option.
>>
>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=4837
>
> Yeah, I was thinking about that. In private discussion with friends, it
> was mentioned that it could be a `declare' option - something like
> (declare no-warn-obsolete) - but that's not very satifying for anything
> other than defuns.

That would cover too much code as well.



reply via email to

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