[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: Re: Bug in Elisp manual: hack-local-variables-hook is undocumente
From: |
Alan Mackenzie |
Subject: |
Patch: Re: Bug in Elisp manual: hack-local-variables-hook is undocumented. |
Date: |
Fri, 13 Jun 2008 11:26:22 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Emacs and David,
On Thu, Jun 12, 2008 at 10:53:45AM +0000, Alan Mackenzie wrote:
> hack-local-variables-hook is missing from the elisp manual.
Here's a patch. Should I install it?
2008-06-13 Alan Mackenzie <address@hidden>
* hooks.texi (Standard Hooks): Mention hack-local-variables-hook.
* variables.texi (File Local Variables): Document
hack-local-variables-hook.
Index: variables.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/variables.texi,v
retrieving revision 1.5
diff -c -r1.5 variables.texi
*** variables.texi 8 Jan 2008 20:45:49 -0000 1.5
--- variables.texi 13 Jun 2008 10:57:52 -0000
***************
*** 1563,1573 ****
@defun hack-local-variables &optional mode-only
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
! function does not look for the @samp{mode:} local variable in the
! @address@hidden line. @code{set-auto-mode} does that, also taking
! @code{enable-local-variables} into account (@pxref{Auto Major Mode}).
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
--- 1563,1576 ----
@defun hack-local-variables &optional mode-only
This function parses, and binds or evaluates as appropriate, any local
! variables specified by the contents of the current buffer. It runs
! the normal hook @code{hack-local-variables-hook} after doing this.
!
! The variable @code{enable-local-variables} has its effect here.
! However, this function does not look for the @samp{mode:} local
! variable in the @address@hidden line. @code{set-auto-mode} does that,
! also taking @code{enable-local-variables} into account (@pxref{Auto
! Major Mode}).
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
***************
*** 1575,1580 ****
--- 1578,1590 ----
It does not set the mode nor any other file local variable.
@end defun
+ @defvar hack-local-variables-hook
+ The value of this variable is a list of functions to be called after
+ setting the local variables in @code{hack-local-variables}.
+
+ This variable is a normal hook. @xref{Hooks}.
+ @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
Index: hooks.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/lispref/hooks.texi,v
retrieving revision 1.4
diff -c -r1.4 hooks.texi
*** hooks.texi 8 Jan 2008 20:45:48 -0000 1.4
--- hooks.texi 13 Jun 2008 10:57:52 -0000
***************
*** 184,189 ****
--- 184,192 ----
@item font-lock-unfontify-region-function
@xref{Other Font Lock Variables}.
+ @item hack-local-variables-hook
+ @xref{File Local Variables}.
+
@item initial-calendar-window-hook
@iftex
@inforef{Calendar Customizing,, emacs-xtra}.
--
Alan Mackenzie (Nuremberg, Germany).