# HG changeset patch # User Richard M. Stallman # Date 765745397 0 # Node ID 6e61dbbfce806782ed485e0dadb84962b529e1ce # Parent bf9c1e9a405507403992841acc145d7db807ec9f (hack-one-local-variable): Test for risky-local-variable property. Put such properties on some variables, including minor-mode-map-alist. diff -r bf9c1e9a4055 -r 6e61dbbfce80 lisp/files.el --- a/lisp/files.el Thu Apr 07 17:44:17 1994 +0000 +++ b/lisp/files.el Thu Apr 07 19:03:17 1994 +0000 @@ -1101,6 +1101,12 @@ '(enable-local-eval) "Variables to be ignored in a file's local variable spec.") +;; Get confirmation before setting these variables as locals in a file. +(put 'eval 'risky-local-variable t) +(put 'file-name-handler-alist 'risky-local-variable t) +(put 'minor-mode-map-alist 'risky-local-variable t) +(put 'after-load-alist 'risky-local-variable t) + ;; "Set" one variable in a local variables spec. ;; A few variable names are treated specially. (defun hack-one-local-variable (var val) @@ -1111,7 +1117,7 @@ nil) ;; "Setting" eval means either eval it or do nothing. ;; Likewise for setting hook variables. - ((or (memq var '(eval file-name-handler-alist after-load-alist)) + ((or (get var 'risky-local-variable) (string-match "-hooks?$\\|-functions?$\\|-forms?$" (symbol-name var))) (if (and (not (string= (user-login-name) "root"))