1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

Update documentation of '.dir-locals-2.el'

See https://lists.gnu.org/r/emacs-devel/2017-11/msg00649.html
for more details.
* lisp/files.el (dir-locals-file-2): Remove unused constant.
* lisp/files.el (dir-locals-file): Mention ".dir-locals-2.el" in
the doc string.
* doc/lispref/variables.texi (Directory Local Variables): Mention
".dir-locals-2.el".
* etc/NEWS: Replace `dir-locals-file-2' mention with
`dir-locals-file'.
This commit is contained in:
Kaushal Modi 2017-11-28 19:17:48 +02:00 committed by Eli Zaretskii
parent f2441ab320
commit 0540df10e6
3 changed files with 16 additions and 11 deletions

View File

@ -1919,7 +1919,12 @@ settings to any file in that directory or any of its subdirectories
(optionally, you can exclude subdirectories; see below). (optionally, you can exclude subdirectories; see below).
If some of the subdirectories have their own @file{.dir-locals.el} If some of the subdirectories have their own @file{.dir-locals.el}
files, Emacs uses the settings from the deepest file it finds starting files, Emacs uses the settings from the deepest file it finds starting
from the file's directory and moving up the directory tree. The file from the file's directory and moving up the directory tree. This
constant is also used to derive the name of a second dir-locals file
@file{.dir-locals-2.el}. If this second dir-locals file is present,
then that is loaded instead of @file{.dir-locals.el}. This is useful
when @file{.dir-locals.el} is under version control in a shared
repository and cannot be used for personal customizations. The file
specifies local variables as a specially formatted list; see specifies local variables as a specially formatted list; see
@ref{Directory Variables, , Per-directory Local Variables, emacs, The @ref{Directory Variables, , Per-directory Local Variables, emacs, The
GNU Emacs Manual}, for more details. GNU Emacs Manual}, for more details.

View File

@ -366,7 +366,7 @@ These local variables will thus not vanish on setting a major mode.
+++ +++
** A second dir-local file (.dir-locals-2.el) is now accepted. ** A second dir-local file (.dir-locals-2.el) is now accepted.
See the variable 'dir-locals-file-2' for more information. See the doc string of 'dir-locals-file' for more information.
+++ +++
** Connection-local variables can be used to specify local variables ** Connection-local variables can be used to specify local variables

View File

@ -3905,16 +3905,16 @@ VARIABLES list of the class. The list is processed in order.
"File that contains directory-local variables. "File that contains directory-local variables.
It has to be constant to enforce uniform values across different It has to be constant to enforce uniform values across different
environments and users. environments and users.
See also `dir-locals-file-2', whose values override this one's.
See Info node `(elisp)Directory Local Variables' for details.")
(defconst dir-locals-file-2 ".dir-locals-2.el" A second dir-locals file can be used by a user to specify their
"File that contains directory-local variables. personal dir-local variables even if the current directory
This essentially a second file that can be used like already has a `dir-locals-file' that is shared with other
`dir-locals-file', so that users can have specify their personal users (such as in a git repository). The name of this second
dir-local variables even if the current directory already has a file is derived by appending \"-2\" to the base name of
`dir-locals-file' that is shared with other users (such as in a `dir-locals-file'. With the default value of `dir-locals-file',
git repository). a \".dir-locals-2.el\" file in the same directory will override
the \".dir-locals.el\".
See Info node `(elisp)Directory Local Variables' for details.") See Info node `(elisp)Directory Local Variables' for details.")
(defun dir-locals--all-files (directory) (defun dir-locals--all-files (directory)