aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2006-01-26 17:55:04 +0000
committerRichard M. Stallman <[email protected]>2006-01-26 17:55:04 +0000
commitf36d46caffc209065f29e7e7fa8daa01994d2e88 (patch)
tree0075d49055dcc9482e9ea737cf864211e8383e3f /lisp
parent8299f39695055ea59e604e7ed849dd2a65a9429c (diff)
(risky-local-variable-p): Follow var aliases.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/files.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index d1202f99d3..112056e4f9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2450,6 +2450,10 @@ is specified, returning t if it is specified."
"Non-nil if SYM could be dangerous as a file-local variable with value VAL.
If VAL is nil or omitted, the question is whether any value might be
dangerous."
+ ;; If this is an alias, check the base name.
+ (condition-case nil
+ (setq sym (indirect-variable sym))
+ (error nil))
(let ((safep (get sym 'safe-local-variable)))
(or (get sym 'risky-local-variable)
(and (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-commands?$\\|-predicates?$\\|font-lock-keywords$\\|font-lock-keywords-[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|-map$\\|-map-alist$"