* Patch: Re: Bug in Elisp manual: hack-local-variables-hook is undocumented.
2008-06-12 10:53 Bug in Elisp manual: hack-local-variables-hook is undocumented Alan Mackenzie
2008-06-12 10:56 ` David Kastrup
@ 2008-06-13 11:26 ` Alan Mackenzie
2008-06-13 14:26 ` Stefan Monnier
1 sibling, 1 reply; 4+ messages in thread
From: Alan Mackenzie @ 2008-06-13 11:26 UTC (permalink / raw)
To: emacs-devel
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 <acm@muc.de>
* 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
! @w{@samp{-*-}} 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 non-@code{nil}, then all
this function does is return @code{t} if the @w{@samp{-*-}} 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 @w{@samp{-*-}} 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 non-@code{nil}, then all
this function does is return @code{t} if the @w{@samp{-*-}} 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).
^ permalink raw reply [flat|nested] 4+ messages in thread