diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-17 22:54:14 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-17 22:54:14 -0500 |
commit | 4a47c2757309e338321da1e7a2f6d399a306ce7d (patch) | |
tree | de441bac2c90c3302459c5f0ffe9c53ec4b31c2f /lisp/files.el | |
parent | 8bbb7dd8a6d08540a81a7a2baa2274d8e6d65c92 (diff) | |
parent | b916cbefa481920a49eac03c7025693f38afc882 (diff) | |
download | emacs-4a47c2757309e338321da1e7a2f6d399a306ce7d.tar.gz |
Merge from emacs-23
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 5 |
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. |