From: Glenn Morris <rgm@gnu.org>
To: oitofelix@gmail.com (Bruno Félix Rezende Ribeiro)
Cc: 10384@debbugs.gnu.org
Subject: bug#10384: 23.2; Emacs Lisp Reference Manual - incorrect or unclear documentation about invocation condition of hooks pre-command-hook and post-command-hook
Date: Wed, 11 Jan 2012 15:40:14 -0500 [thread overview]
Message-ID: <pgk44ym0r5.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87y5txhcmi.fsf@felix-laptop.gnung> ("Bruno Félix Rezende Ribeiro"'s message of "Tue, 27 Dec 2011 20:29:41 -0200")
Bruno Félix Rezende Ribeiro wrote:
> Unless this behavior is justified by the expression "The editor command
> loop runs", I guess there is a contradiction.
Yes, it's implicit in the phrase "editor command loop".
If you think about it, the alternative interpretation doesn't make
sense. When called non-interactively, a command is just any old Lisp
function. So for it work the way you thought it might, Emacs would have
to check every single Lisp function call to see if that function was a
command, and if so run a hook before and after it. This would be pretty
impractical. Also what if a hook function called a function that
happened to be a command? :)
> When I press `C-h v pre-command-hook <RET>' I get
>
> Documentation:
> Normal hook run before each command is executed.
I could perhaps change this to say:
Normal hook run before any command is executed interactively.
and similarly for post-command-hook.
I don't know what else to change. Perhaps add a note somewhere
(commandp?) that when a command is called non-interactively, it behaves
like any other Lisp function, and gets no special treatment.
next prev parent reply other threads:[~2012-01-11 20:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-27 22:29 bug#10384: 23.2; Emacs Lisp Reference Manual - incorrect or unclear documentation about invocation condition of hooks pre-command-hook and post-command-hook Bruno Félix Rezende Ribeiro
2012-01-11 20:40 ` Glenn Morris [this message]
2012-01-11 22:40 ` Glenn Morris
2012-01-12 1:24 ` Stefan Monnier
2012-01-27 8:36 ` Chong Yidong
2012-01-16 9:21 ` bug#10384: [Bruno Félix Rezende Ribeiro] " Bruno Félix Rezende Ribeiro
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=pgk44ym0r5.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=10384@debbugs.gnu.org \
--cc=oitofelix@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.