aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorArtur Malabarba2016-01-25 22:42:50 +0000
committerArtur Malabarba2016-01-25 23:42:41 +0000
commitda976cff352bdea6adc2667582a56eb4061bb5f6 (patch)
tree73b89ceb316306267ca9816dd8d30a0445382fb9 /doc
parent914fb99d38f8a9db7fbf926d0cf34b808d581afe (diff)
downloademacs-da976cff352bdea6adc2667582a56eb4061bb5f6.tar.gz
emacs-da976cff352bdea6adc2667582a56eb4061bb5f6.zip
* lisp/files.el: Use a fixed file name for the second dir-locals file
(dir-locals-file): Revert to its original fixed value. (dir-locals-file-2): New const. (dir-locals--all-files): Don't use `file-name-all-completions'. Instead, just check for the 2 dir-locals files and return a list of the ones that exit (if any). * etc/NEWS: Document the change. * doc/emacs/custom.texi (Directory Variables): Document the change. * doc/lispref/variables.texi (Directory Local Variables): Update accordingly.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/custom.texi4
-rw-r--r--doc/lispref/variables.texi39
2 files changed, 15 insertions, 28 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 670848c65a1..7be660c85d1 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1299,8 +1299,8 @@ named @file{.dir-locals.el}@footnote{ On MS-DOS, the name of this file
1299should be @file{_dir-locals.el}, due to limitations of the DOS 1299should be @file{_dir-locals.el}, due to limitations of the DOS
1300filesystems. If the filesystem is limited to 8+3 file names, the name 1300filesystems. If the filesystem is limited to 8+3 file names, the name
1301of the file will be truncated by the OS to @file{_dir-loc.el}. 1301of the file will be truncated by the OS to @file{_dir-loc.el}.
1302}@footnote{ You can also use files like @file{.dir-locals2.el}, which 1302}@footnote{ You can also use @file{.dir-locals-2.el}, which
1303are loaded in addition. This is useful when @file{.dir-locals.el} is 1303is loaded in addition. This is useful when @file{.dir-locals.el} is
1304under version control in a shared repository and can't be used for 1304under version control in a shared repository and can't be used for
1305personal customizations. } in a 1305personal customizations. } in a
1306directory. Whenever Emacs visits any file in that directory or any of 1306directory. Whenever Emacs visits any file in that directory or any of
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 42701614365..6c53e9b6cca 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1765,33 +1765,20 @@ variables: by putting them in a special file, or by defining a
1765@dfn{project class} for that directory. 1765@dfn{project class} for that directory.
1766 1766
1767@defvr Constant dir-locals-file 1767@defvr Constant dir-locals-file
1768This constant is a wildcard pattern matching the name of files where 1768This constant is the name of the file where Emacs expects to find the
1769Emacs expects to find directory-local variables. Its value is 1769directory-local variables. The name of the file is
1770@file{.dir-locals*.el}@footnote{ 1770@file{.dir-locals.el}@footnote{
1771The MS-DOS version of Emacs uses @file{_dir-locals*.el} instead, due to 1771The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to
1772limitations of the DOS filesystems. 1772limitations of the DOS filesystems.
1773}, and the most common file name to use is @file{.dir-locals.el}. 1773}. A file by that name in a directory causes Emacs to apply its
1774 1774settings to any file in that directory or any of its subdirectories
1775Any file matching this name pattern in a directory causes Emacs to 1775(optionally, you can exclude subdirectories; see below).
1776apply its settings when visiting files in that directory or any of its 1776If some of the subdirectories have their own @file{.dir-locals.el}
1777subdirectories (optionally, you can exclude subdirectories; see 1777files, Emacs uses the settings from the deepest file it finds starting
1778below). 1778from the file's directory and moving up the directory tree. The file
1779If some of the subdirectories have their own file matching 1779specifies local variables as a specially formatted list; see
1780@file{.dir-locals*.el}, Emacs uses the settings from the deepest file 1780@ref{Directory Variables, , Per-directory Local Variables, emacs, The
1781it finds starting from the file's directory and moving up the 1781GNU Emacs Manual}, for more details.
1782directory tree. The file specifies local variables as a specially
1783formatted list; see @ref{Directory Variables, , Per-directory Local
1784Variables, emacs, The GNU Emacs Manual}, for more details.
1785
1786If the same directory contains multiple such files (for instance,
1787@file{.dir-locals.el} and @file{.dir-locals2.el}), then all of them
1788are used in @code{string<} order. This means that, if two files
1789specify different values for the same variable, the file sorted after
1790will override the value of the previous file (for instance, values in
1791@file{.dir-locals2.el} override those in @file{.dir-locals.el}). Note
1792that, because of how lexicographic order works, values in
1793@file{.dir-locals10.el} are overridden by values in @file{.dir-locals2.el}.
1794This can be avoided by using @file{.dir-locals02.el} instead.
1795@end defvr 1782@end defvr
1796 1783
1797@defun hack-dir-local-variables 1784@defun hack-dir-local-variables