From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Ken Manheimer <ken.manheimer@gmail.com>, emacs-devel@gnu.org
Subject: Re: allout patch - more safe-local-variables, plus autoloads
Date: Tue, 18 Apr 2006 09:18:41 -0400 [thread overview]
Message-ID: <8764l7m40w.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1FVpm4-0005uv-W8@fencepost.gnu.org> (Richard Stallman's message of "Tue, 18 Apr 2006 08:57:44 -0400")
> I see that you've used t as the property value.
> That allows any type of value.
> Most of these variables are supposed to be strings.
> I don't know what would happen if they were set to other types;
> did you check each one?
> It would be safer to use stringp as the property value
> for a variable that is supposed to be a string.
BTW, I thought we had decided not to support the special case t to mean "any
value is safe" and instead force the use of explicit predicates (which can
still be (lambda (x) t), of course: you can make it harder for people to
shoot themselves in the foot, but you can't prevent them from doing so if
they're sufficiently motivated).
Shouldn't we do that (basically the patch below, plus many other patches to
fix all the places where we use t).
Stefan
--- files.el 13 avr 2006 10:22:03 -0400 1.826
+++ files.el 18 avr 2006 09:10:34 -0400
@@ -2643,15 +2643,11 @@
* There is a matching entry (SYM . VAL) in the
`safe-local-variable-values' user option.
- * The `safe-local-variable' property of SYM is t.
-
* The `safe-local-variable' property of SYM is a function that
evaluates to a non-nil value with VAL as an argument."
(or (member (cons sym val) safe-local-variable-values)
(let ((safep (get sym 'safe-local-variable)))
- (or (eq safep t)
- (and (functionp safep)
- (funcall safep val))))))
+ (and (functionp safep) (funcall safep val)))))
(defun risky-local-variable-p (sym &optional ignored)
"Non-nil if SYM could be dangerous as a file-local variable.
next prev parent reply other threads:[~2006-04-18 13:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-17 19:11 allout patch - more safe-local-variables, plus autoloads Ken Manheimer
2006-04-18 12:57 ` Richard Stallman
2006-04-18 13:18 ` Stefan Monnier [this message]
2006-04-19 4:17 ` Richard Stallman
2006-04-19 4:39 ` Stefan Monnier
2006-04-19 21:12 ` Richard Stallman
2006-04-20 2:47 ` Luc Teirlinck
2006-04-20 17:34 ` Stefan Monnier
2006-04-21 13:07 ` Richard Stallman
2006-04-21 15:02 ` Ken Manheimer
2006-04-21 15:09 ` David Kastrup
2006-04-21 15:39 ` Ken Manheimer
2006-04-21 17:15 ` Stefan Monnier
2006-04-24 21:19 ` Ken Manheimer
2006-04-19 23:08 ` Ken Manheimer
2006-04-20 10:35 ` Richard Stallman
2006-04-20 18:49 ` autoloads for safe-local-variables (was: allout patch - more safe-local-variables, plus autoloads) Reiner Steib
2006-04-20 19:52 ` autoloads for safe-local-variables (was: allout patch - moresafe-local-variables, " Stuart D. Herring
2006-04-21 13:07 ` autoloads for safe-local-variables (was: allout patch - more safe-local-variables, " Richard Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8764l7m40w.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=ken.manheimer@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).