]> code.delx.au - gnu-emacs/commitdiff
(risky-local-variable-p): Follow var aliases.
authorRichard M. Stallman <rms@gnu.org>
Thu, 26 Jan 2006 17:55:04 +0000 (17:55 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 26 Jan 2006 17:55:04 +0000 (17:55 +0000)
lisp/files.el

index d1202f99d3a0c922963fbc1b4abc90c7a237eee5..112056e4f9e0e33571a855cc0b843d7602602444 100644 (file)
@@ -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$"