aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/variables.texi29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index e05d3bb0f81..c63057e31ea 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2277,6 +2277,35 @@ modification times of the associated directory local variables file
2277updates this list. 2277updates this list.
2278@end defvar 2278@end defvar
2279 2279
2280@defvar hack-dir-local-get-variables-functions
2281This special hook holds the functions that gather the directory-local
2282variables to use for a given buffer. By default it contains just the
2283function that obeys the other settings described in the present section.
2284But it can be used to add support for more sources of directory-local
2285variables, such as those used by other text editors.
2286
2287The functions on this hook are called with no argument, in the buffer to
2288which we intend to apply the directory-local variables, after the
2289buffer's major mode function has been run, so it can use sources of
2290information such as @code{major-mode} or @code{buffer-file-name} to find
2291the variables that should be applied.
2292
2293It should return either a cons cell of the form @code{(@var{directory}
2294. @var{alist})} or a list of such cons-cells. A @code{nil} return value
2295means that it found no directory-local variables. @var{directory}
2296should be a string: the name of the directory to which the variables
2297apply. @var{alist} is a list of variables together with their values
2298that apply to the current buffer, where every element is of the form
2299@code{(@var{varname} . @var{value})}.
2300
2301The various @var{alist} returned by these functions will be combined,
2302and in case of conflicts, the settings coming from deeper directories
2303will take precedence over those coming from higher directories in the
2304directory hierarchy. Finally, since this hook is run every time we visit
2305a file it is important to try and keep those functions efficient, which
2306will usually require some of caching.
2307@end defvar
2308
2280@defvar enable-dir-local-variables 2309@defvar enable-dir-local-variables
2281If @code{nil}, directory-local variables are ignored. This variable 2310If @code{nil}, directory-local variables are ignored. This variable
2282may be useful for modes that want to ignore directory-locals while 2311may be useful for modes that want to ignore directory-locals while