diff options
| author | Glenn Morris | 2011-02-28 19:05:28 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-02-28 19:05:28 -0800 |
| commit | 6640b281f372aebe09d0e323b79a9aa7c311fcc2 (patch) | |
| tree | f18250d5164ee22f85af3d5668ece566de9871ff /doc/lispref | |
| parent | cead857b3afcf0ed0166f397cb69c478a6c368f6 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 8 |
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 @@ | |||
| 1 | 2011-03-01 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * variables.texi (Directory Local Variables): | ||
| 4 | Mention `(subdirs . nil)' alist element. | ||
| 5 | |||
| 1 | 2011-02-28 Glenn Morris <rgm@gnu.org> | 6 | 2011-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 | |||
| 1718 | The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to | 1718 | The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to |
| 1719 | limitations of the DOS filesystems. | 1719 | limitations 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 |
| 1721 | settings to any file in that directory or any of its subdirectories. | 1721 | settings to any file in that directory or any of its subdirectories |
| 1722 | (optionally, you can exclude subdirectories; see below). | ||
| 1722 | If some of the subdirectories have their own @file{.dir-locals.el} | 1723 | If some of the subdirectories have their own @file{.dir-locals.el} |
| 1723 | files, Emacs uses the settings from the deepest file it finds starting | 1724 | files, Emacs uses the settings from the deepest file it finds starting |
| 1724 | from the file's directory and moving up the directory tree. The file | 1725 | from 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}, | |||
| 1749 | then the all the variables in the associated @var{alist} are applied; | 1750 | then 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})}. |
| 1751 | A special value @code{nil} for @var{major-mode} means the settings are | 1752 | A special value @code{nil} for @var{major-mode} means the settings are |
| 1752 | applicable to any mode. | 1753 | applicable 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 | ||
| 1756 | directory, not to those in any subdirectories. | ||
| 1753 | 1757 | ||
| 1754 | With the second form of @var{variables}, if @var{directory} is the | 1758 | With the second form of @var{variables}, if @var{directory} is the |
| 1755 | initial substring of the file's directory, then @var{list} is applied | 1759 | initial substring of the file's directory, then @var{list} is applied |