Mercurial > emacs
comparison lisp/files.el @ 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 | 02ee07034f11 |
children | defefddf88db |
comparison
equal
deleted
inserted
replaced
8170:d92a24366b22 | 8171:750282040c17 |
---|---|
1143 (put 'minor-mode-map-alist 'risky-local-variable t) | 1143 (put 'minor-mode-map-alist 'risky-local-variable t) |
1144 (put 'after-load-alist 'risky-local-variable t) | 1144 (put 'after-load-alist 'risky-local-variable t) |
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)))) |
1151 | 1155 |
1152 ;; "Set" one variable in a local variables spec. | 1156 ;; "Set" one variable in a local variables spec. |
1158 ((memq var ignored-local-variables) | 1162 ((memq var ignored-local-variables) |
1159 nil) | 1163 nil) |
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. |
1167 (if (or (and (eq var 'eval) | 1171 (if (or (and (eq var 'eval) |
1168 (consp val) | 1172 (consp val) |