From: Chong Yidong <cyd@stupidchicken.com>
To: Michael Kifer <kifer@cs.stonybrook.edu>
Cc: emacs-devel@gnu.org
Subject: Viper doesn't properly handle C-h k for mouse clicks
Date: Sat, 17 Mar 2007 16:32:47 -0400 [thread overview]
Message-ID: <87vegz391s.fsf_-_@stupidchicken.com> (raw)
In-Reply-To: <45EEA997.6030108@gmail.com> (Lennart Borgman's message of "Wed\, 07 Mar 2007 13\:01\:27 +0100")
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> I am little bit ashamed to say that it seems to be some problem with
> Viper. I will contact Michael Kifer.
The problem, despite the original bug report, has nothing to do with
text properties. With viper on, do C-h k and click anywhere with the
mouse. You will see that only the down-mouse binding gets reported;
in comparison, when viper is off, the up-mouse binding also gets
reported.
The problem is that viper handles describe-key using advice. In
viper.el:1028, we find the following code:
(defadvice describe-key (before viper-describe-key-ad protect activate)
"Force to read key via `viper-read-key-sequence'."
(interactive (list (viper-read-key-sequence "Describe key: "))))
This changes the interactive form of describe-key. Unfortunately, the
real interactive form of describe-key isn't read-key-sequence---it's a
complicated 35-line-long Lisp function, whose goal is (among other
things) to capture the up-events corresponding to down-mouse events!
If viper really has to use advice, it's better to use around-advice:
instead of changing describe-key's interactive spec, allow
describe-key's interactive spec parse the mouse events, then change
the KEY argument *afterwards*.
(In the long run, I think we should change viper to avoid using
advice, but I don't think it's feasible in the Emacs 22 time frame;
OTOH, this would be a significant change.)
next prev parent reply other threads:[~2007-03-17 20:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 2:56 [lennart.borgman@gmail.com: C-h k does not catch text properies keymaps] Richard Stallman
2007-03-05 15:27 ` Chong Yidong
2007-03-05 21:21 ` David Kastrup
2007-03-05 21:33 ` Lennart Borgman (gmail)
2007-03-05 22:11 ` Chong Yidong
2007-03-05 22:35 ` Lennart Borgman (gmail)
2007-03-05 22:38 ` Chong Yidong
2007-03-05 23:30 ` Lennart Borgman (gmail)
2007-03-06 22:36 ` Richard Stallman
2007-03-06 22:48 ` Lennart Borgman (gmail)
2007-03-07 9:10 ` Richard Stallman
2007-03-07 12:01 ` Lennart Borgman (gmail)
2007-03-17 20:32 ` Chong Yidong [this message]
2007-03-21 16:19 ` Viper doesn't properly handle C-h k for mouse clicks Chong Yidong
2007-03-21 17:01 ` Michael Kifer
2007-03-06 16:01 ` [lennart.borgman@gmail.com: C-h k does not catch text properies keymaps] Richard Stallman
2007-03-06 17:25 ` Lennart Borgman (gmail)
2007-03-05 21:50 ` 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=87vegz391s.fsf_-_@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=kifer@cs.stonybrook.edu \
/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.