emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master bbce223: Fix documentation of a recent changeset (bug#5003)


From: Eli Zaretskii
Subject: master bbce223: Fix documentation of a recent changeset (bug#5003)
Date: Sun, 18 Jul 2021 14:54:43 -0400 (EDT)

branch: master
commit bbce22337c5334544da5d0cee0abad954e42a08c
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix documentation of a recent changeset (bug#5003)
    
    * lisp/files.el (safe-local-variable-values)
    (ignored-local-variable-values): Doc fix.
    (ignored-local-variable-values): Add :version tag.
    
    * doc/emacs/custom.texi (Safe File Variables): Mention
    'ignored-local-variable-values'.
    * doc/lispref/variables.texi (File Local Variables): Fix wording.
    
    * etc/NEWS: Improve wording of the 'ignored-local-variable-values'
    entry.
---
 doc/emacs/custom.texi      | 10 +++++++++-
 doc/lispref/variables.texi | 17 ++++++++++-------
 etc/NEWS                   |  4 ++--
 lisp/files.el              | 10 ++++++----
 4 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index bd505d2..0a417f1 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -623,7 +623,7 @@ button.
 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
@@ -1271,7 +1271,13 @@ confirmation prompt.  When Emacs encounters these 
variable/value pairs
 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
@@ -1283,6 +1289,8 @@ can enter @kbd{!} at the prompt.  It applies all the 
variables, but only
 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
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 541b53f..f2307c8 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1996,13 +1996,16 @@ file.
 @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
diff --git a/etc/NEWS b/etc/NEWS
index 611df3a..29568e7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2225,8 +2225,8 @@ This command, called interactively, toggles the local 
value of
 +++
 *** 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.
diff --git a/lisp/files.el b/lisp/files.el
index ce4521b8..59077cd 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3435,7 +3435,7 @@ Major modes can use this to examine user-specified local 
variables
 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.
 
@@ -3445,14 +3445,16 @@ Also see `ignored-local-variable-values'."
   :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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]