From: Stefan Monnier <monnier@iro.umontreal.ca>
To: npostavs@users.sourceforge.net
Cc: 23933@debbugs.gnu.org, kifer@cs.stonybrook.edu, tino.calancha@gmail.com
Subject: bug#23933: 25.1.50; Run a buffer-local hook with mapc
Date: Sun, 10 Jul 2016 17:12:27 -0400 [thread overview]
Message-ID: <jwvmvlpdwzq.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87furhh0yb.fsf@users.sourceforge.net> (npostavs's message of "Sun, 10 Jul 2016 13:12:12 -0400")
> (defun ediff-really-quit (reverse-default-keep-variants)
> ...
> (let (...
> (after-quit-hook-internal ediff-after-quit-hook-internal)
> And as mentioned in the patch, ediff-filegroup-action calls add-hook
> with non-nil LOCAL on ediff-after-quit-hook-internal.
And there we have a problem. When t is encountered in the buffer-local
part of ediff-after-quit-hook-internal, it means to run the global part
of ediff-after-quit-hook-internal, but when we copy the list to
after-quit-hook-internal, this link is broken and run-hooks can't know
that a t in after-quit-hook-internal means to run the functions found in
the global part of ediff-after-quit-hook-internal.
Or looked at it another way, this let-binding does not copy the whole
content of the hook, only the buffer-local part of it which is not
sufficient when the hook has a buffer-local value as well as a non-nil
global value.
Most likely it works OK in practice because
ediff-after-quit-hook-internal typically has a nil global binding.
It might make sense to use something like:
;; FIXME: Here we ignore the global part of the
;; ediff-after-quit-hook-internal hook.
(after-quit-hook-internal (remq t ediff-after-quit-hook-internal))
-- Stefan
next prev parent reply other threads:[~2016-07-10 21:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-10 10:18 bug#23933: 25.1.50; Run a buffer-local hook with mapc Tino Calancha
2016-07-10 14:44 ` Eli Zaretskii
2016-07-10 15:18 ` Stefan Monnier
2016-07-10 15:55 ` Eli Zaretskii
2016-07-10 17:01 ` Stefan Monnier
2016-07-10 17:12 ` npostavs
2016-07-10 21:12 ` Stefan Monnier [this message]
2016-07-11 16:02 ` Tino Calancha
2016-07-11 16:05 ` Tino Calancha
2016-07-10 17:15 ` Eli Zaretskii
2016-07-10 17:31 ` Tino Calancha
2016-07-10 17:41 ` Noam Postavsky
2016-07-10 17:52 ` Eli Zaretskii
2016-07-10 18:14 ` Tino Calancha
2016-07-10 15:56 ` Eli Zaretskii
2016-07-10 17:02 ` Stefan Monnier
2016-07-10 18:28 ` Andreas Schwab
2016-07-11 16:06 ` bug#23933: (no subject) Tino Calancha
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=jwvmvlpdwzq.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=23933@debbugs.gnu.org \
--cc=kifer@cs.stonybrook.edu \
--cc=npostavs@users.sourceforge.net \
--cc=tino.calancha@gmail.com \
/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.