2179 |
;; This case is safe because the user gets to check it before it is used. |
;; This case is safe because the user gets to check it before it is used. |
2180 |
(put 'compile-command 'safe-local-variable 'stringp) |
(put 'compile-command 'safe-local-variable 'stringp) |
2181 |
|
|
2182 |
(defun risky-local-variable-p (sym val) |
(defun risky-local-variable-p (sym &optional val) |
2183 |
"Non-nil if SYM could be dangerous as a file-local variable with value VAL. |
"Non-nil if SYM could be dangerous as a file-local variable with value VAL. |
2184 |
If VAL is nil, the question is whether any value might be dangerous." |
If VAL is nil or omitted, the question is whether any value might be |
2185 |
|
dangerous." |
2186 |
(let ((safep (get sym 'safe-local-variable))) |
(let ((safep (get sym 'safe-local-variable))) |
2187 |
(or (memq sym ignored-local-variables) |
(or (memq sym ignored-local-variables) |
2188 |
(get sym 'risky-local-variable) |
(get sym 'risky-local-variable) |