[Top][All Lists]

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

Re: Risky local variable mechanism

From: Luc Teirlinck
Subject: Re: Risky local variable mechanism
Date: Fri, 3 Feb 2006 22:34:02 -0600 (CST)

Richard Stallman wrote:

       Why not make anything risky, except those explicit settings which
       are recorded in safe-local-eval-forms (and add something similar
       for variables), and then make it easier to update those lists
       when user is queried to approve local variables/forms

   That could be a good approach.

   Would someone like to implement this?

Note that we _already_ have a similar mechanism, which is more
flexible than the proposed one, because it allows the safety to depend
on both the variable _and_ its value:

>From `(elisp)File Local Variables':

    These rules can be overridden by giving the variable's name a
    non-`nil' `safe-local-variable' property.  If one gives it a
    `safe-local-variable' property of `t', then one can give the variable
    any file local value.  One can also give any symbol, including the
    above, a `safe-local-variable' property that is a function taking
    exactly one argument.  In that case, giving a variable with that name
    a file local value is only allowed if the function returns non-`nil'
    when called with that value as argument.



reply via email to

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