X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/20aa42e8204f8f0139ba3880cb32ddf88acc9bf4..HEAD:/doc/lispref/variables.texi diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 5a2cae0f67..dd3f18be4e 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-2015 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-2016 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @node Variables @chapter Variables @@ -1613,7 +1613,7 @@ any form of file-local variable. For examples of why you might want to use this, @pxref{Auto Major Mode}. @end defvar -@defun hack-local-variables &optional mode-only +@defun hack-local-variables &optional handle-mode This function parses, and binds or evaluates as appropriate, any local variables specified by the contents of the current buffer. The variable @code{enable-local-variables} has its effect here. However, this @@ -1630,11 +1630,15 @@ is non-@code{nil}; it always calls the other hook. This function ignores a @samp{mode} element if it specifies the same major mode as the buffer already has. -If the optional argument @var{mode-only} is non-@code{nil}, then all -this function does is return a symbol specifying the major mode, -if the @w{@samp{-*-}} line or the local variables list specifies one, -and @code{nil} otherwise. It does not set the mode nor any other -file-local variable. +If the optional argument @var{handle-mode} is @code{t}, then all this +function does is return a symbol specifying the major mode, if the +@w{@samp{-*-}} line or the local variables list specifies one, and +@code{nil} otherwise. It does not set the mode or any other +file-local variable. If @var{handle-mode} has any value other than +@code{nil} or @code{t}, any settings of @samp{mode} in the +@w{@samp{-*-}} line or the local variables list are ignored, and the +other settings are applied. If @var{handle-mode} is @code{nil}, all +the file local variables are set. @end defun @defvar file-local-variables-alist @@ -1765,33 +1769,20 @@ variables: by putting them in a special file, or by defining a @dfn{project class} for that directory. @defvr Constant dir-locals-file -This constant is a wildcard pattern matching the name of files where -Emacs expects to find directory-local variables. Its value is -@file{.dir-locals*.el}@footnote{ -The MS-DOS version of Emacs uses @file{_dir-locals*.el} instead, due to +This constant is the name of the file where Emacs expects to find the +directory-local variables. The name of the file is +@file{.dir-locals.el}@footnote{ +The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to limitations of the DOS filesystems. -}, and the most common file name to use is @file{.dir-locals.el}. - -Any file matching this name pattern in a directory causes Emacs to -apply its settings when visiting files in that directory or any of its -subdirectories (optionally, you can exclude subdirectories; see -below). -If some of the subdirectories have their own file matching -@file{.dir-locals*.el}, Emacs uses the settings from the deepest file -it finds starting from the file's directory and moving up the -directory tree. The file specifies local variables as a specially -formatted list; see @ref{Directory Variables, , Per-directory Local -Variables, emacs, The GNU Emacs Manual}, for more details. - -If the same directory contains multiple such files (for instance, -@file{.dir-locals.el} and @file{.dir-locals2.el}), then all of them -are used in @code{string<} order. This means that, if two files -specify different values for the same variable, the file sorted after -will override the value of the previous file (for instance, values in -@file{.dir-locals2.el} override those in @file{.dir-locals.el}). Note -that, because of how lexicographic order works, values in -@file{.dir-locals10.el} are overridden by values in @file{.dir-locals2.el}. -This can be avoided by using @file{.dir-locals02.el} instead. +}. A file by that name in a directory causes Emacs to apply its +settings to any file in that directory or any of its subdirectories +(optionally, you can exclude subdirectories; see below). +If some of the subdirectories have their own @file{.dir-locals.el} +files, Emacs uses the settings from the deepest file it finds starting +from the file's directory and moving up the directory tree. The file +specifies local variables as a specially formatted list; see +@ref{Directory Variables, , Per-directory Local Variables, emacs, The +GNU Emacs Manual}, for more details. @end defvr @defun hack-dir-local-variables @@ -2068,7 +2059,7 @@ cdar nthcdr A call to any of the following Emacs-specific functions: @smallexample -default-value process-get +alist-get process-get frame-parameter process-sentinel terminal-parameter window-buffer keymap-parent window-display-table @@ -2077,7 +2068,7 @@ overlay-get window-hscroll overlay-start window-parameter overlay-end window-point process-buffer window-start -process-filter +process-filter default-value @end smallexample @end itemize