From: drkm <darkman_spam@yahoo.fr>
Subject: 'risky-local-variable-p' bug in regard of the 'safe-local-variable' property?
Date: Sat, 18 Jun 2005 01:07:34 +0200 [thread overview]
Message-ID: <wku0jw1t1l.fsf@yahoo.fr> (raw)
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
reply other threads:[~2005-06-17 23:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wku0jw1t1l.fsf@yahoo.fr \
--to=darkman_spam@yahoo.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.