# HG changeset patch # User Richard M. Stallman # Date 1138298104 0 # Node ID b393baae88e04501dbc490acfde18e3df680a747 # Parent d2b4af1c4fef9ed81f52ad29a865e98ac2723f94 (risky-local-variable-p): Follow var aliases. diff -r d2b4af1c4fef -r b393baae88e0 lisp/files.el --- a/lisp/files.el Thu Jan 26 17:54:27 2006 +0000 +++ b/lisp/files.el Thu Jan 26 17:55:04 2006 +0000 @@ -2450,6 +2450,10 @@ "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$"