diff options
| author | Kaushal Modi | 2017-11-28 19:17:48 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-11-28 19:17:48 +0200 |
| commit | 0540df10e63ba624a775cfe1bba4124456591cf5 (patch) | |
| tree | 9a016173e21ae7ed1100ee260cffe3e4814b96e7 | |
| parent | f2441ab3204274cba16f5cab19e98db61d468fb7 (diff) | |
| download | emacs-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.texi | 7 | ||||
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/files.el | 18 |
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). |
| 1920 | If some of the subdirectories have their own @file{.dir-locals.el} | 1920 | If some of the subdirectories have their own @file{.dir-locals.el} |
| 1921 | files, Emacs uses the settings from the deepest file it finds starting | 1921 | files, Emacs uses the settings from the deepest file it finds starting |
| 1922 | from the file's directory and moving up the directory tree. The file | 1922 | from the file's directory and moving up the directory tree. This |
| 1923 | constant 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, | ||
| 1925 | then that is loaded instead of @file{.dir-locals.el}. This is useful | ||
| 1926 | when @file{.dir-locals.el} is under version control in a shared | ||
| 1927 | repository and cannot be used for personal customizations. The file | ||
| 1923 | specifies local variables as a specially formatted list; see | 1928 | specifies 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 |
| 1925 | GNU Emacs Manual}, for more details. | 1930 | GNU Emacs Manual}, for more details. |
| @@ -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. |
| 369 | See the variable 'dir-locals-file-2' for more information. | 369 | See 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. |
| 3906 | It has to be constant to enforce uniform values across different | 3906 | It has to be constant to enforce uniform values across different |
| 3907 | environments and users. | 3907 | environments and users. |
| 3908 | See also `dir-locals-file-2', whose values override this one's. | ||
| 3909 | See Info node `(elisp)Directory Local Variables' for details.") | ||
| 3910 | 3908 | ||
| 3911 | (defconst dir-locals-file-2 ".dir-locals-2.el" | 3909 | A second dir-locals file can be used by a user to specify their |
| 3912 | "File that contains directory-local variables. | 3910 | personal dir-local variables even if the current directory |
| 3913 | This essentially a second file that can be used like | 3911 | already has a `dir-locals-file' that is shared with other |
| 3914 | `dir-locals-file', so that users can have specify their personal | 3912 | users (such as in a git repository). The name of this second |
| 3915 | dir-local variables even if the current directory already has a | 3913 | file 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', |
| 3917 | git repository). | 3915 | a \".dir-locals-2.el\" file in the same directory will override |
| 3916 | the \".dir-locals.el\". | ||
| 3917 | |||
| 3918 | See Info node `(elisp)Directory Local Variables' for details.") | 3918 | See Info node `(elisp)Directory Local Variables' for details.") |
| 3919 | 3919 | ||
| 3920 | (defun dir-locals--all-files (directory) | 3920 | (defun dir-locals--all-files (directory) |