aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1994-07-07 16:25:53 +0000
committerRichard M. Stallman1994-07-07 16:25:53 +0000
commitb0ffcc0de821733a18ed6712765527b57e797edc (patch)
tree234558a2785499eaa475accfff0dc75e91362848 /lisp
parent1d3dac41c0a34c3877618907ddc96e0364082537 (diff)
downloademacs-b0ffcc0de821733a18ed6712765527b57e797edc.tar.gz
emacs-b0ffcc0de821733a18ed6712765527b57e797edc.zip
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/files.el6
1 files changed, 5 insertions, 1 deletions
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
1145(put 'buffer-file-name 'risky-local-variable t) 1145(put 'buffer-file-name 'risky-local-variable t)
1146(put 'buffer-auto-save-file-name 'risky-local-variable t) 1146(put 'buffer-auto-save-file-name 'risky-local-variable t)
1147(put 'buffer-file-truename 'risky-local-variable t) 1147(put 'buffer-file-truename 'risky-local-variable t)
1148(put 'exec-path 'risky-local-variable t)
1149(put 'load-path 'risky-local-variable t)
1150(put 'exec-directory 'risky-local-variable t)
1151(put 'process-environment 'risky-local-variable t)
1148 1152
1149(defun hack-one-local-variable-quotep (exp) 1153(defun hack-one-local-variable-quotep (exp)
1150 (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp)))) 1154 (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
1160 ;; "Setting" eval means either eval it or do nothing. 1164 ;; "Setting" eval means either eval it or do nothing.
1161 ;; Likewise for setting hook variables. 1165 ;; Likewise for setting hook variables.
1162 ((or (get var 'risky-local-variable) 1166 ((or (get var 'risky-local-variable)
1163 (string-match "-hooks?$\\|-functions?$\\|-forms?$" 1167 (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$"
1164 (symbol-name var))) 1168 (symbol-name var)))
1165 ;; Permit evaling a put of a harmless property 1169 ;; Permit evaling a put of a harmless property
1166 ;; if the args do nothing tricky. 1170 ;; if the args do nothing tricky.