the theme file and asks if you really want to load it. Because
loading a Custom theme can execute arbitrary Lisp code, you should
only say yes if you know that the theme is safe; in that case, Emacs
-offers to remember in the future that the theme is safe (this is done
+offers to remember in the future that the theme is safe(this is done
by saving the theme file's SHA-256 hash to the variable
@code{custom-safe-themes}; if you want to treat all themes as safe,
change its value to @code{t}). Themes that come with Emacs (in the
subsequently, in the same file or others, it will assume they are
safe.
+ You can also tell Emacs to permanently ignore all the variable/value
+pairs in the file, by typing @kbd{i} at the confirmation prompt --
+these pairs will thereafter ignored in this file and in all other
+files.
+
@vindex safe-local-variable-values
+@vindex ignored-local-variable-values
@cindex risky variable
Some variables, such as @code{load-path}, are considered
particularly @dfn{risky}: there is seldom any reason to specify them
marks the non-risky ones as safe for the future. If you really want to
record safe values for risky variables, do it directly by customizing
@samp{safe-local-variable-values} (@pxref{Easy Customization}).
+Similarly, if you want to record values of risky variables that should
+be permanently ignored, customize @code{ignored-local-variable-values}.
@vindex enable-local-variables
The variable @code{enable-local-variables} allows you to change the
@end defopt
@defopt ignored-local-variable-values
-If there are some local variables that you always want to always
-ignore, this variable can be used. It uses the same syntax as
-@code{safe-local-variable-values}, but the variable/value pairs here
-will always be ignored when handling local variables. As with that
-variable, when Emacs queries the user about whether to obey a
-file-local variable, the user can choose to ignore them permanently,
-and that will alter this variable and save it to the user's custom file.
+If there are some values of particular local variables that you always
+want to ignore completely, you can this variable. Its value has the
+same form as @code{safe-local-variable-values}; a file-local variable
+setting to the value that appears in the list will always be ignored
+when processing the local variables specified by the file. As with
+that variable, when Emacs queries the user about whether to obey a
+file-local variable, you can choose to ignore their particular values
+permanently, and that will alter this variable and save it to the
+user's custom file. Variable-value pairs that appear in this variable
+take precedence over the same pairs in @code{safe-local-variable-values}.
@end defopt
@defun safe-local-variable-p sym val
+++
*** New user option 'ignored-local-variable-values'.
This is the opposite of 'safe-local-variable-values' -- it's an alist
-of local variables (and accompanying values) that are to be ignored
-when reading a local variable section from a file.
+of variable-value pairs that are to be ignored when reading a
+local-variables section of a file.
---
*** 'indent-tabs-mode' is now a global minor mode instead of just a variable.
in order to initialize other data structure based on them.")
(defcustom safe-local-variable-values nil
- "List variable-value pairs that are considered safe.
+ "List of variable-value pairs that are considered safe.
Each element is a cons cell (VAR . VAL), where VAR is a variable
symbol and VAL is a value that is considered safe.
:type 'alist)
(defcustom ignored-local-variable-values nil
- "List variable-value pairs that will be ignored.
+ "List of variable-value pairs that should always be ignored.
Each element is a cons cell (VAR . VAL), where VAR is a variable
-symbol and VAL is a value that will be ignored.
+symbol and VAL is its value; if VAR is set to VAL by a file-local
+variables section, that setting should be ignored.
Also see `safe-local-variable-values'."
:risky t
:group 'find-file
- :type 'alist)
+ :type 'alist
+ :version "28.1")
(defcustom safe-local-eval-forms
;; This should be here at least as long as Emacs supports write-file-hooks.