GNU bug report logs - #7236
24.0.50; make-local-hook missing

Previous Next

Package: emacs;

Reported by: saint <at> eng.it

Date: Mon, 18 Oct 2010 15:02:02 UTC

Severity: minor

Tags: wontfix

Merged with 11104

Found in versions 24.0.50, 24.0.94

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 7236 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> IRO.UMontreal.CA>
Cc: 'Alan Mackenzie' <acm <at> muc.de>, 7236 <at> debbugs.gnu.org, saint <at> eng.it
Subject: RE: bug#7236: 24.0.50; make-local-hook missing
Date: Tue, 19 Oct 2010 10:14:13 -0700
> > In Emacs 20 also there is a LOCAL optional arg to add-hook.
> 
> Yes, but its semantics is slightly different: it means "put it on the
> local part of the hook, but only if that local part exists".  
> I.e. it's only effective if make-local-hook has been called before.
> I changed this in Emacs-21 (it an incompatible change, but 
> didn't cause any bug report AFAIR) which made make-local-hook a NOP.
> 
> > Should all code for Emacs 20-24 remove make-local-hook calls and
> > instead add `t' to an existing call to add-hook?
> 
> No. If the LOCAL arg is nil, add-hook will only affect the global part
> of the hook, regardless of whether make-local-hook has been called.

Glad I asked!  I removed calls to make-local-hook yesterday, but put them back
today in code that needs to work in Emacs 20.  Thanks for the explanation.  I
see that you mentioned it in NEWS.21.





This bug report was last modified 13 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.