diff lisp/files.el @ 9162:53d02761f5b7

(hack-one-local-variable): Support safe-local-variable property. (compile-command): Add safe-local-variable property.
author Richard M. Stallman <rms@gnu.org>
date Tue, 27 Sep 1994 22:59:50 +0000
parents b5c6b76c0722
children e537b2e10006
line wrap: on
line diff
--- a/lisp/files.el	Tue Sep 27 21:43:37 1994 +0000
+++ b/lisp/files.el	Tue Sep 27 22:59:50 1994 +0000
@@ -1169,6 +1169,9 @@
 (put 'outline-level 'risky-local-variable t)
 (put 'rmail-output-file-alist 'risky-local-variable t)
 
+;; This one is safe because the user gets to check it before it is used.
+(put 'compile-command 'safe-local-variable t)
+
 (defun hack-one-local-variable-quotep (exp)
   (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp))))
 
@@ -1183,8 +1186,10 @@
 	;; "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?$\\|-program$\\|-command$"
-			   (symbol-name var)))
+	     (and
+	      (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$"
+			    (symbol-name var))
+	      (not (get var 'safe-local-variable))))
 	 ;; Permit evaling a put of a harmless property
 	 ;; if the args do nothing tricky.
 	 (if (or (and (eq var 'eval)