From: Lute Kamstra <Lute.Kamstra@cwi.nl>
Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org
Subject: Re: remove-hook.
Date: Fri, 10 Oct 2003 16:25:49 +0200 [thread overview]
Message-ID: <sgdu16h6ufm.fsf@occarina.pna.cwi.nl> (raw)
In-Reply-To: <E1A76J0-000300-58@fencepost.gnu.org> (Richard Stallman's message of "Wed, 08 Oct 2003 00:52:10 -0400")
Richard Stallman <rms@gnu.org> writes:
> It also seems necessary to keep remove-hook efficient: when I
> instrumented it, I noticed that it was called twice every
> keystroke.
>
> That really surprises me. Who is calling it, and why?
I tried to figure this out, but it is rather annoying, to say the
least. Once I instrument remove-hook, almost every key I press
triggers Edebug (one or more times). Who is calling remove hook to do
what depends on which features are turned on. I also get the
impression (not sure, though) that Edebug itself causes remove-hook to
be called. The horror, the horror...
Before I went insane, I did manage to come up with a simple and,
hopefully, easy to reproduce example. Start Emacs with "emacs -q
--no-site-file lisp/subr.el" and do "C-u C-M-x" on remove-hook. Now
try moving around the buffer a bit. Every keystroke will warp you
into Edebug due to a (remove-hook 'pre-command-hook
'blink-cursor-end).
If you want to go insane too, start Emacs with "emacs -q
--no-site-file lisp/subr.el", do "M-x global-font-lock-mode", and do
"C-u C-M-x" on remove-hook. Now switch to the *scratch* buffer with
"C-x b RET" (this will invoke Edebug some 12 times, just `c' through
them) and then try to type something into the *scratch* buffer. Every
insertion evokes Edebug 5 times.
Enjoy!
Lute.
next prev parent reply other threads:[~2003-10-10 14:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-07 13:25 remove-hook Lute Kamstra
2003-10-07 13:40 ` remove-hook Luc Teirlinck
2003-10-07 13:42 ` remove-hook Stefan Monnier
2003-10-07 14:00 ` remove-hook Lute Kamstra
2003-10-07 14:59 ` remove-hook Stefan Monnier
2003-10-07 15:13 ` remove-hook Lute Kamstra
2003-10-07 15:24 ` remove-hook Stefan Monnier
2003-10-07 22:04 ` remove-hook Luc Teirlinck
2003-10-08 4:52 ` remove-hook Richard Stallman
2003-10-10 14:25 ` Lute Kamstra [this message]
2003-10-11 17:12 ` remove-hook Richard Stallman
2003-10-08 4:52 ` remove-hook Richard Stallman
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=sgdu16h6ufm.fsf@occarina.pna.cwi.nl \
--to=lute.kamstra@cwi.nl \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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.