From: Richard M. Stallman Date: Thu, 7 Jul 1994 16:25:53 +0000 (+0000) Subject: (process-environment, exec-path, load-path,exec-directory): X-Git-Tag: emacs-19.34~7682 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b0ffcc0de821733a18ed6712765527b57e797edc;p=emacs.git (process-environment, exec-path, load-path,exec-directory): Mark these as risky. (hack-one-local-variable): Treat vars ending in -program and -command as risky. --- diff --git a/lisp/files.el b/lisp/files.el index ed6bb39cafd..f3486cc9cc2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1145,6 +1145,10 @@ If `enable-local-variables' is nil, this function does not check for a (put 'buffer-file-name 'risky-local-variable t) (put 'buffer-auto-save-file-name 'risky-local-variable t) (put 'buffer-file-truename 'risky-local-variable t) +(put 'exec-path 'risky-local-variable t) +(put 'load-path 'risky-local-variable t) +(put 'exec-directory 'risky-local-variable t) +(put 'process-environment 'risky-local-variable t) (defun hack-one-local-variable-quotep (exp) (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) @@ -1160,7 +1164,7 @@ If `enable-local-variables' is nil, this function does not check for a ;; "Setting" eval means either eval it or do nothing. ;; Likewise for setting hook variables. ((or (get var 'risky-local-variable) - (string-match "-hooks?$\\|-functions?$\\|-forms?$" + (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$" (symbol-name var))) ;; Permit evaling a put of a harmless property ;; if the args do nothing tricky.