From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Patch: Re: Bug in Elisp manual: hack-local-variables-hook is undocumented. Date: Fri, 13 Jun 2008 11:26:22 +0000 Message-ID: <20080613112622.GC2618@muc.de> References: <20080612105345.GA3629@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1213355053 21199 80.91.229.12 (13 Jun 2008 11:04:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Jun 2008 11:04:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 13 13:04:56 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K775J-0001Oh-ST for ged-emacs-devel@m.gmane.org; Fri, 13 Jun 2008 13:04:46 +0200 Original-Received: from localhost ([127.0.0.1]:60082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K774W-0005j8-4B for ged-emacs-devel@m.gmane.org; Fri, 13 Jun 2008 07:03:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K774R-0005gI-Cr for emacs-devel@gnu.org; Fri, 13 Jun 2008 07:03:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K774P-0005dw-E2 for emacs-devel@gnu.org; Fri, 13 Jun 2008 07:03:50 -0400 Original-Received: from [199.232.76.173] (port=40886 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K774P-0005dh-6L for emacs-devel@gnu.org; Fri, 13 Jun 2008 07:03:49 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:2181 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K774O-00041S-Ok for emacs-devel@gnu.org; Fri, 13 Jun 2008 07:03:49 -0400 Original-Received: (qmail 23665 invoked by uid 3782); 13 Jun 2008 11:03:44 -0000 Original-Received: from acm.muc.de (pD9E53262.dip.t-dialin.net [217.229.50.98]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 13 Jun 2008 13:03:43 +0200 Original-Received: (qmail 4311 invoked by uid 1000); 13 Jun 2008 11:26:22 -0000 Content-Disposition: inline In-Reply-To: <20080612105345.GA3629@muc.de> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:99088 Archived-At: 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 * 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).