From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 7236@debbugs.gnu.org, saint@eng.it
Subject: bug#7236: 24.0.50; make-local-hook missing
Date: Tue, 19 Oct 2010 12:32:12 -0400 [thread overview]
Message-ID: <jwvd3r6m9k7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <9D100A0D59D34365AD1993719B18D9D6@us.oracle.com> (Drew Adams's message of "Mon, 18 Oct 2010 19:15:59 -0700")
>> No: m-l-h is also unnecessary when add-hook is called with a nil LOCAL
>> argument. I know of no case where calling make-local-hook makes
>> a difference in Emacs>=21.
> 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.
Stefan
next prev parent reply other threads:[~2010-10-19 16:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-18 10:06 bug#7236: 24.0.50; make-local-hook missing Gian Uberto Lauri
2010-10-18 17:00 ` Stefan Monnier
2010-10-18 17:06 ` saint
2010-10-18 20:14 ` Stefan Monnier
2010-10-18 21:42 ` Alan Mackenzie
2010-10-19 1:22 ` Stefan Monnier
2010-10-19 2:15 ` Drew Adams
2010-10-19 16:32 ` Stefan Monnier [this message]
2010-10-19 17:14 ` Drew Adams
2010-10-19 7:11 ` saint
2010-10-19 16:32 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvd3r6m9k7.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=7236@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=saint@eng.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.