[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/doc/lispref/variables.texi,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/doc/lispref/variables.texi,v |
Date: |
Sun, 19 Oct 2008 13:01:04 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 08/10/19 13:01:03
Index: variables.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/variables.texi,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- variables.texi 15 Oct 2008 11:48:14 -0000 1.7
+++ variables.texi 19 Oct 2008 13:01:03 -0000 1.8
@@ -1577,12 +1577,38 @@
@address@hidden 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
address@hidden, and applies each local variable in
+turn. It calls @code{before-hack-local-variables-hook} and
address@hidden before and after applying the
+variables, respectively.
+
If the optional argument @var{mode-only} is address@hidden, then all
this function does is return @code{t} if the @address@hidden 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
address@hidden 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
address@hidden@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.
address@hidden defvar
+
address@hidden before-hack-local-variables-hook
+Emacs calls this hook immediately before applying file-local variables
+stored in @code{file-local-variables-alist}.
address@hidden defvar
+
address@hidden hack-local-variables-hook
+Emacs calls this hook immediately after it finishes applying
+file-local variables stored in @code{file-local-variables-alist}.
address@hidden 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