summaryrefslogtreecommitdiff
path: root/doc/emacs/custom.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/emacs/custom.texi')
-rw-r--r--doc/emacs/custom.texi19
1 files changed, 15 insertions, 4 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 51992ea028e..c84f4a975d8 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1037,9 +1037,10 @@ explicitly. For example, here's how to obtain the default value of
@cindex file local variables
A file can specify local variable values to use when editing the
-file with Emacs. Visiting the file checks for local variable
-specifications; it automatically makes these variables local to the
-buffer, and sets them to the values specified in the file.
+file with Emacs. Visiting the file or setting a major mode checks for
+local variable specifications; it automatically makes these variables
+local to the buffer, and sets them to the values specified in the
+file.
@menu
* Specifying File Variables:: Specifying file local variables.
@@ -1298,7 +1299,11 @@ accomplished with @dfn{directory-local variables}.
named @file{.dir-locals.el}@footnote{ On MS-DOS, the name of this file
should be @file{_dir-locals.el}, due to limitations of the DOS
filesystems. If the filesystem is limited to 8+3 file names, the name
-of the file will be truncated by the OS to @file{_dir-loc.el}. } in a
+of the file will be truncated by the OS to @file{_dir-loc.el}.
+}@footnote{ You can also use @file{.dir-locals-2.el}, which
+is loaded in addition. This is useful when @file{.dir-locals.el} is
+under version control in a shared repository and can't be used for
+personal customizations. } in a
directory. Whenever Emacs visits any file in that directory or any of
its subdirectories, it will apply the directory-local variables
specified in @file{.dir-locals.el}, as though they had been defined as
@@ -1340,6 +1345,12 @@ be applied in the current directory, not in any subdirectories.
Finally, it specifies a different @file{ChangeLog} file name for any
file in the @file{src/imported} subdirectory.
+You can specify the variables @code{mode}, @code{eval}, and
+@code{unibyte} in your @file{.dir-locals.el}, and they have the same
+meanings as they would have in file local variables. @code{coding}
+cannot be specified as a directory local variable. @xref{File
+Variables}.
+
@findex add-dir-local-variable
@findex delete-dir-local-variable
@findex copy-file-locals-to-dir-locals