summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-11-17 22:54:14 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2010-11-17 22:54:14 -0500
commit4a47c2757309e338321da1e7a2f6d399a306ce7d (patch)
treede441bac2c90c3302459c5f0ffe9c53ec4b31c2f /lisp/files.el
parent8bbb7dd8a6d08540a81a7a2baa2274d8e6d65c92 (diff)
parentb916cbefa481920a49eac03c7025693f38afc882 (diff)
downloademacs-4a47c2757309e338321da1e7a2f6d399a306ce7d.tar.gz
Merge from emacs-23
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index ca698cab33d..3b130a20d2b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3224,7 +3224,10 @@ It is safe if any of these conditions are met:
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)))
- (and (functionp safep) (funcall safep val)))))
+ (and (functionp safep)
+ ;; If the function signals an error, that means it
+ ;; can't assure us that the value is safe.
+ (with-demoted-errors (funcall safep val))))))
(defun risky-local-variable-p (sym &optional ignored)
"Non-nil if SYM could be dangerous as a file-local variable.