changeset 8171:750282040c17

(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.
author Richard M. Stallman <rms@gnu.org>
date Thu, 07 Jul 1994 16:25:53 +0000
parents d92a24366b22
children 1eb5638ab4b5
files lisp/files.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Thu Jul 07 06:50:45 1994 +0000
+++ b/lisp/files.el	Thu Jul 07 16:25:53 1994 +0000
@@ -1145,6 +1145,10 @@
 (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 @@
 	;; "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.