[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
'risky-local-variable-p' bug in regard of the 'safe-local-variable' prop
From: |
drkm |
Subject: |
'risky-local-variable-p' bug in regard of the 'safe-local-variable' property? |
Date: |
Sat, 18 Jun 2005 01:07:34 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (windows-nt) |
Hi
Imagine I have some variable, for which 'risky-local-variable-p'
returns 't'. But I want to change this, and say this variable is
safe when I want to set it t 'nil'. So I use something like:
(put '...-function 'safe-local-variable 'null)
But 'risky-local-variable-p' ends with:
(or (null val)
(not (funcall safep val)))))))
so it's not possible to say a variable is safe if I try to set it
to 'nil'. Why? I don't understand this. And while it's correct
in regard of the 'risky-local-variable-p' docstring:
"Non-nil if SYM could be dangerous as a file-local variable
with value VAL. If VAL is nil or omitted, the question is
whether any value might be dangerous."
it's not correct in regard of the manual (info: (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.
So what's the correct meaning of:
(put '...-function 'safe-local-variable 'null)
in this context? And why the "(or (null val) ..."?
--drkm
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 'risky-local-variable-p' bug in regard of the 'safe-local-variable' property?,
drkm <=