these pairs will thereafter be ignored in this file and in all other
files.
- For directory-local variable/value pairs
-(@pxref{Directory Variables}), typing @kbd{+} at the confirmation
-prompt will set all the variable/value pairs, and recognize all
-variables in that directory as safe in the future. This option should
-only be used for directories whose contents you trust. The @kbd{+}
-confirmation prompt option is not available for file-local variables.
+ When Emacs asks for confirmation for setting directory-local
+variables (@pxref{Directory Variables}), typing @kbd{+} at the
+confirmation prompt will set all the variables, and also add the
+directory to the list in @code{safe-local-variable-directories}
+(described below), which will cause Emacs to consider this directory
+as safe for loading any directory-local variables in the future. The
+@kbd{+} response should only be used for directories whose contents
+you trust.
@vindex safe-local-variable-values
@vindex ignored-local-variable-values
be permanently ignored, customize @code{ignored-local-variable-values}.
@vindex safe-local-variable-directories
- Sometimes it is helpful to always trust risky variables in a certain
-directory, and skip the confirmation prompt when directory-local
-variables are loaded there. When @kbd{+} is pressed at the risky
-variable confirmation prompt, the directory in question is added to
-the @samp{safe-local-variable-directories} variable, and risky
-directory-local variables there will be loaded without prompting in
-the future. If customizing @samp{safe-local-variable-directories}
+ Sometimes it is helpful to always trust directory-variables in
+certain directories, and skip the confirmation prompt when local
+variables are loaded from those directories, even if the variables are
+risky. The variable @code{safe-local-variable-directories} holds the
+list of such directories. The names of the directories in this list
+must be full absolute file names, and should end in a slash. If the
+variable @code{enable-remote-dir-locals} has a non-@code{nil} value,
+the list can include remote directories as well (@pxref{Remote
+Files}).
+
+When @kbd{+} is pressed
+at the risky variable confirmation prompt, the directory in question
+is added to the @samp{safe-local-variable-directories} variable, and
+risky directory-local variables there will be loaded without prompting
+in the future. If customizing @samp{safe-local-variable-directories}
manually, the directories in this list must be fully-expanded absolute
paths that end in a directory separator character. Directory paths
may be remote directory paths (@pxref{Remote Files}), if the
enabled. Directory-local variables loaded from these directories,
such as the variables in @file{.dir-locals.el}, will be enabled even
if they are risky. The directories in this list must be
-fully-expanded absolute paths that end in a directory separator
-character. They may also be remote directory paths if the
-@code{enable-remote-dir-locals} variable is set to @code{t}.
-Directory paths in this list are case-sensitive, even if the
-filesystem is not.
+fully-expanded absolute file names that end in a directory separator
+character. They may also be remote directories if the variable
+@code{enable-remote-dir-locals} is set non-@code{nil}. Directories in
+this list are matched case-sensitively, even if the filesystem is
+case-sensitive.
@end defvar
@defun hack-local-variables &optional handle-mode
(defcustom safe-local-variable-directories '()
"A list of directories where local variables are always enabled.
Directory-local variables loaded from these directories, such as the
-variables in .dir-locals.el, will be enabled even if they are risky."
+variables in .dir-locals.el, will be enabled even if they are risky.
+The names of the directories in the list must be absolute, and must
+end in a slash. Remote directories can be included if the
+variable `enable-remote-dir-locals' is non-nil."
:version "30.1"
:type '(repeat string)
:risky t