aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-10-26 22:34:14 +0000
committerRichard M. Stallman2002-10-26 22:34:14 +0000
commit0d8781d856ad2d8af7f735737441c01a20258e71 (patch)
tree59c3598a5ba3e8dbe5b79040a4e8d33c36ad2a95
parent4244e7dc9c624a4b9268498465a65b23039d6bd6 (diff)
downloademacs-0d8781d856ad2d8af7f735737441c01a20258e71.tar.gz
emacs-0d8781d856ad2d8af7f735737441c01a20258e71.zip
(risky-local-variable-p): VAL=nil has special meaning.
-rw-r--r--lisp/files.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index be6cdfeb9b7..f050713e135 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2061,7 +2061,8 @@ is specified, returning t if it is specified."
2061(put 'compile-command 'safe-local-variable 'stringp) 2061(put 'compile-command 'safe-local-variable 'stringp)
2062 2062
2063(defun risky-local-variable-p (sym val) 2063(defun risky-local-variable-p (sym val)
2064 "Non-nil if SYM could be dangerous as a file-local variable with value VAL." 2064 "Non-nil if SYM could be dangerous as a file-local variable with value VAL.
2065If VAL is nil, the question is whether any value might be dangerous."
2065 (let ((safep (get sym 'safe-local-variable))) 2066 (let ((safep (get sym 'safe-local-variable)))
2066 (or (memq sym ignored-local-variables) 2067 (or (memq sym ignored-local-variables)
2067 (get sym 'risky-local-variable) 2068 (get sym 'risky-local-variable)
@@ -2071,7 +2072,8 @@ is specified, returning t if it is specified."
2071 ;; If the safe-local-variable property isn't t or nil, 2072 ;; If the safe-local-variable property isn't t or nil,
2072 ;; then it must return non-nil on the proposed value to be safe. 2073 ;; then it must return non-nil on the proposed value to be safe.
2073 (and (not (memq safep '(t nil))) 2074 (and (not (memq safep '(t nil)))
2074 (not (funcall safep val)))))) 2075 (or (null val)
2076 (not (funcall safep val)))))))
2075 2077
2076(defcustom safe-local-eval-forms nil 2078(defcustom safe-local-eval-forms nil
2077 "*Expressions that are considered \"safe\" in an `eval:' local variable. 2079 "*Expressions that are considered \"safe\" in an `eval:' local variable.