2008-10-19 Eli Zaretskii <eliz@gnu.org>
+ * hooks.texi (Standard Hooks): Mention
+ `before-hack-local-variables-hook' and `hack-local-variables-hook'.
+
+ * variables.texi (File Local Variables): Document
+ `file-local-variables-alist', `before-hack-local-variables-hook'
+ and `hack-local-variables-hook'.
+
* processes.texi (Synchronous Processes): Document `process-lines'.
* customize.texi (Variable Definitions): Document
@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking
@code{enable-local-variables} into account (@pxref{Auto Major Mode}).
+This function works by walking the alist stored in
+@code{file-local-variables-alist}, and applies each local variable in
+turn. It calls @code{before-hack-local-variables-hook} and
+@code{hack-local-variables-hook} before and after applying the
+variables, respectively.
+
If the optional argument @var{mode-only} is non-@code{nil}, then all
this function does is return @code{t} if the @w{@samp{-*-}} line or
the local variables list specifies a mode and @code{nil} otherwise.
It does not set the mode nor any other file local variable.
@end defun
+@defvar file-local-variables-alist
+This buffer-local variable holds the alist of file-local variable
+settings. Each element of the alist is of the form
+@w{@code{(@var{var} . @var{value})}}, where @var{var} is a symbol of
+the local variable and @var{value} is its value. When Emacs visits a
+file, it first collects all the file-local variables into this alist,
+and then the @code{hack-local-variables} function applies them one by
+one.
+@end defvar
+
+@defvar before-hack-local-variables-hook
+Emacs calls this hook immediately before applying file-local variables
+stored in @code{file-local-variables-alist}.
+@end defvar
+
+@defvar hack-local-variables-hook
+Emacs calls this hook immediately after it finishes applying
+file-local variables stored in @code{file-local-variables-alist}.
+@end defvar
+
If a file local variable could specify a function that would
be called later, or an expression that would be executed later, simply
visiting a file could take over your Emacs. Emacs takes several
*** set-file-modes is now interactive and can take the mode value in
symbolic notation thanks to auxiliary functions.
++++
+*** file-local-variables-alist stores an alist of file-local
+variables defined in the current buffer.
+
** Process changes
+++
*** The new function `start-file-process' is similar to `start-process',
*** New variables:
-**** file-local-variables-alist stores an alist of file-local
-variables defined in the current buffer.
-
**** `find-word-boundary-function-table' is a char-table of functions to
search for a word boundary.
*** New hooks:
++++
**** before-hack-local-variables-hook is called after setting new
variable file-local-variables-alist, and before actually applying the
file-local variables.