emacs-devel
[Top][All Lists]
Advanced

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

Re: Policy for declaring safe local variable values


From: Joost Kremers
Subject: Re: Policy for declaring safe local variable values
Date: Fri, 08 Oct 2021 17:06:30 +0200
User-agent: mu4e 1.6.6; emacs 27.2.50

On Fri, Oct 08 2021, Titus von der Malsburg wrote:
>> Fun fact: answering your e-mail in Emacs I got the same question. :-)
>
> This is scary and perhaps even a bug? It seems wrong that text in e-mails 
> should
> be allowed to set local variables.

You might be right.

>> `defcustom` even has a keyword for it (`:safe`), so I don't think it violates
>> any conventions.
>>
>> TBH, I use this method in some of my packages and it never occurred to me it
>> might be against conventions...
>
> Thank you.  I wasn’t aware of the ‘:safe‘ keyword.

Note that the Elisp manual says that using `:safe` has a disadvantage and that
an autoload cookie may be a better solution (scroll down a little or search for
"autoload"):

(info "(elisp) File Local Variables")



-- 
Joost Kremers
Life has its moments



reply via email to

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