]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/custom.texi
Call hack-local-variables from major modes rather than from file visiting
[gnu-emacs] / doc / emacs / custom.texi
index 5cb52e62ab9c7c65cb206079f899c72a782f044a..01637ae98ade8a5e672b7301614f7d649dd4ad3d 100644 (file)
@@ -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.
@@ -1344,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