From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: 30955@debbugs.gnu.org
Cc: Colin Baxter <m43cap@yandex.com>
Subject: bug#30955: 27.0.50; Mouse clicks on header-line in Info are broken
Date: Tue, 27 Mar 2018 14:46:01 -0400 [thread overview]
Message-ID: <jwvbmf9s6qw.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <83po3qga5g.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Mar 2018 17:54:19 +0300")
> To reproduce:
>
> emacs -Q
> C-u C-h i /path/to/info/elisp.info RET
> 2
> 3
> 4
> Click mouse-1 on the "Up: Programming Types" link on the header-line
Hmm... I reduced it to
src/emacs -Q --eval '(info "(elisp)Numbers")'
Click mouse-1 on the "Up" link on the header-line
and I fixed the "obvious" problem (see patch below), but now that just
gives me:
<header-line> <mouse-2> is undefined
instead of
<header-line> <header-line> <mouse-2> is undefined
So now the event-rewrite gives the expected result (i.e. "<header-line>
<mouse-2>"), but for some reason it decides it's unbound even tho it
clearly is. IOW it seems to be looking in the wrong keymap(s).
Stefan "not looking forward to debug sessions in read_key_sequence"
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 6a98ee7353..fe8b76e953 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -135,7 +137,12 @@ mouse--click-1-maybe-follows-link
(unless (get newup 'event-kind)
(put newup 'event-kind
(get (car last-input-event) 'event-kind)))
- (vector (cons newup (cdr last-input-event)))))))))
+ ;; Modify the event in-place, otherwise we can get a prefix
+ ;; added again, so a click on the header-line turns
+ ;; into a [header-line header-line mouse-2] :-(.
+ ;; See fake_prefixed_keys in src/keyboard.c's.
+ (setf (car last-input-event) newup)
+ (vector last-input-event)))))))
(define-key key-translation-map [down-mouse-1]
#'mouse--down-1-maybe-follows-link)
next prev parent reply other threads:[~2018-03-27 18:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 14:54 bug#30955: 27.0.50; Mouse clicks on header-line in Info are broken Eli Zaretskii
2018-03-27 18:46 ` Stefan Monnier [this message]
2018-03-27 19:27 ` Stefan Monnier
2018-03-28 6:07 ` Colin Baxter
2018-03-29 11:00 ` Eli Zaretskii
2018-03-29 12:10 ` Stefan Monnier
2018-03-29 12:24 ` Eli Zaretskii
2018-03-29 13:11 ` Stefan Monnier
2018-03-29 13:30 ` Colin Baxter
2018-03-31 17:18 ` Eli Zaretskii
2018-03-31 18:56 ` Colin Baxter
2018-03-31 19:03 ` Eli Zaretskii
2018-03-31 19:16 ` Eli Zaretskii
2018-03-31 20:59 ` Colin Baxter
2018-03-31 20:55 ` Colin Baxter
2018-03-31 23:40 ` Stefan Monnier
2018-04-01 6:50 ` Eli Zaretskii
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=jwvbmf9s6qw.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=30955@debbugs.gnu.org \
--cc=m43cap@yandex.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.