diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-11 17:19:01 -0500 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-11 17:19:01 -0500 |
| commit | acef0722fc954a88eea588486b478f49b1afdc6a (patch) | |
| tree | 6d7b78590da45bbedec5fd7486e22dd28e56daed /lisp/files.el | |
| parent | 7bea8c7a92e1fb3eaf1a4e9f2becdaf0074f64ad (diff) | |
| download | emacs-acef0722fc954a88eea588486b478f49b1afdc6a.tar.gz | |
* lisp/files.el (safe-local-variable-p): Gracefully handle errors.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Simplify the
safety predicate.
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 0664bfd3844..4901c3872cd 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3134,7 +3134,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. |
