aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushal Modi2017-11-28 19:17:48 +0200
committerEli Zaretskii2017-11-28 19:17:48 +0200
commit0540df10e63ba624a775cfe1bba4124456591cf5 (patch)
tree9a016173e21ae7ed1100ee260cffe3e4814b96e7
parentf2441ab3204274cba16f5cab19e98db61d468fb7 (diff)
downloademacs-0540df10e63ba624a775cfe1bba4124456591cf5.tar.gz
emacs-0540df10e63ba624a775cfe1bba4124456591cf5.zip
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'.
-rw-r--r--doc/lispref/variables.texi7
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/files.el18
3 files changed, 16 insertions, 11 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index a871352b004..5bee0f9d82a 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1919,7 +1919,12 @@ settings to any file in that directory or any of its subdirectories
1919(optionally, you can exclude subdirectories; see below). 1919(optionally, you can exclude subdirectories; see below).
1920If some of the subdirectories have their own @file{.dir-locals.el} 1920If some of the subdirectories have their own @file{.dir-locals.el}
1921files, Emacs uses the settings from the deepest file it finds starting 1921files, Emacs uses the settings from the deepest file it finds starting
1922from the file's directory and moving up the directory tree. The file 1922from the file's directory and moving up the directory tree. This
1923constant is also used to derive the name of a second dir-locals file
1924@file{.dir-locals-2.el}. If this second dir-locals file is present,
1925then that is loaded instead of @file{.dir-locals.el}. This is useful
1926when @file{.dir-locals.el} is under version control in a shared
1927repository and cannot be used for personal customizations. The file
1923specifies local variables as a specially formatted list; see 1928specifies local variables as a specially formatted list; see
1924@ref{Directory Variables, , Per-directory Local Variables, emacs, The 1929@ref{Directory Variables, , Per-directory Local Variables, emacs, The
1925GNU Emacs Manual}, for more details. 1930GNU Emacs Manual}, for more details.
diff --git a/etc/NEWS b/etc/NEWS
index f7a9feb6e49..4ccf468693c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -366,7 +366,7 @@ These local variables will thus not vanish on setting a major mode.
366 366
367+++ 367+++
368** A second dir-local file (.dir-locals-2.el) is now accepted. 368** A second dir-local file (.dir-locals-2.el) is now accepted.
369See the variable 'dir-locals-file-2' for more information. 369See the doc string of 'dir-locals-file' for more information.
370 370
371+++ 371+++
372** Connection-local variables can be used to specify local variables 372** Connection-local variables can be used to specify local variables
diff --git a/lisp/files.el b/lisp/files.el
index d8b38a9f169..8021e1bbed5 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3905,16 +3905,16 @@ VARIABLES list of the class. The list is processed in order.
3905 "File that contains directory-local variables. 3905 "File that contains directory-local variables.
3906It has to be constant to enforce uniform values across different 3906It has to be constant to enforce uniform values across different
3907environments and users. 3907environments and users.
3908See also `dir-locals-file-2', whose values override this one's.
3909See Info node `(elisp)Directory Local Variables' for details.")
3910 3908
3911(defconst dir-locals-file-2 ".dir-locals-2.el" 3909A second dir-locals file can be used by a user to specify their
3912 "File that contains directory-local variables. 3910personal dir-local variables even if the current directory
3913This essentially a second file that can be used like 3911already has a `dir-locals-file' that is shared with other
3914`dir-locals-file', so that users can have specify their personal 3912users (such as in a git repository). The name of this second
3915dir-local variables even if the current directory already has a 3913file is derived by appending \"-2\" to the base name of
3916`dir-locals-file' that is shared with other users (such as in a 3914`dir-locals-file'. With the default value of `dir-locals-file',
3917git repository). 3915a \".dir-locals-2.el\" file in the same directory will override
3916the \".dir-locals.el\".
3917
3918See Info node `(elisp)Directory Local Variables' for details.") 3918See Info node `(elisp)Directory Local Variables' for details.")
3919 3919
3920(defun dir-locals--all-files (directory) 3920(defun dir-locals--all-files (directory)