aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorGlenn Morris2011-02-28 19:05:28 -0800
committerGlenn Morris2011-02-28 19:05:28 -0800
commit6640b281f372aebe09d0e323b79a9aa7c311fcc2 (patch)
treef18250d5164ee22f85af3d5668ece566de9871ff /doc/lispref
parentcead857b3afcf0ed0166f397cb69c478a6c368f6 (diff)
downloademacs-6640b281f372aebe09d0e323b79a9aa7c311fcc2.tar.gz
emacs-6640b281f372aebe09d0e323b79a9aa7c311fcc2.zip
Add the ability to exclude dir-locals from subdirs. (Bug#8100)
* lisp/files.el (dir-locals-collect-variables): Add the ability to exclude subdirectories. * doc/emacs/custom.texi (Directory Variables): Give an example of excluding subdirectories. * doc/lispref/variables.texi (Directory Local Variables): Mention `(subdirs . nil)' alist element. * etc/NEWS: Mention this addition. * lisp/dired-x.el (dired-omit-here-always): Add `(subdirs . nil)' to locals.
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/variables.texi8
2 files changed, 11 insertions, 2 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index c8925715f74..1a980f14f3d 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12011-03-01 Glenn Morris <rgm@gnu.org>
2
3 * variables.texi (Directory Local Variables):
4 Mention `(subdirs . nil)' alist element.
5
12011-02-28 Glenn Morris <rgm@gnu.org> 62011-02-28 Glenn Morris <rgm@gnu.org>
2 7
3 * variables.texi (Directory Local Variables): Mention the optional 8 * variables.texi (Directory Local Variables): Mention the optional
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index c6af304416c..a68b2b6dd4e 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1718,7 +1718,8 @@ directory-local variables. The name of the file is
1718The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to 1718The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to
1719limitations of the DOS filesystems. 1719limitations of the DOS filesystems.
1720}. A file by that name in a directory causes Emacs to apply its 1720}. A file by that name in a directory causes Emacs to apply its
1721settings to any file in that directory or any of its subdirectories. 1721settings to any file in that directory or any of its subdirectories
1722(optionally, you can exclude subdirectories; see below).
1722If some of the subdirectories have their own @file{.dir-locals.el} 1723If some of the subdirectories have their own @file{.dir-locals.el}
1723files, Emacs uses the settings from the deepest file it finds starting 1724files, Emacs uses the settings from the deepest file it finds starting
1724from the file's directory and moving up the directory tree. The file 1725from the file's directory and moving up the directory tree. The file
@@ -1749,7 +1750,10 @@ file's buffer turns on a mode that is derived from @var{major-mode},
1749then the all the variables in the associated @var{alist} are applied; 1750then the all the variables in the associated @var{alist} are applied;
1750@var{alist} should be of the form @code{(@var{name} . @var{value})}. 1751@var{alist} should be of the form @code{(@var{name} . @var{value})}.
1751A special value @code{nil} for @var{major-mode} means the settings are 1752A special value @code{nil} for @var{major-mode} means the settings are
1752applicable to any mode. 1753applicable to any mode. In @var{alist}, you can use a special
1754@var{name}: @code{subdirs}. If the associated value is
1755@code{nil}, the alist is only applied to files in the relevant
1756directory, not to those in any subdirectories.
1753 1757
1754With the second form of @var{variables}, if @var{directory} is the 1758With the second form of @var{variables}, if @var{directory} is the
1755initial substring of the file's directory, then @var{list} is applied 1759initial substring of the file's directory, then @var{list} is applied