From: "olaf.rogalsky@t-online.de" <olaf.rogalsky@t-online.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "29104@debbugs.gnu.org" <29104@debbugs.gnu.org>
Subject: bug#29104: AW: bug#29104: [PATCH]: xterm-mouse-mode clicks in the modeline dont use the keymap properties of the modeline strings
Date: Mon, 13 Nov 2017 14:57:54 +0100 (CET) [thread overview]
Message-ID: <1510581474048.7762584.ec34b569bff8873067a3b84e08b73b2215d5dd1a@spica.telekom.de> (raw)
In-Reply-To: <83375lp2ti.fsf@gnu.org>
In a more radical approach and instead of my original patch, one can get rid off
with the variable first_event all together, see patch below. It simplifies the code
a little bit, but of course is more risky.
Olaf
diff --git a/src/keyboard.c b/src/keyboard.c
index ee353d2..8df43b8 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8916,7 +8916,6 @@ static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object,
ptrdiff_t keys_start;
Lisp_Object current_binding = Qnil;
- Lisp_Object first_event = Qnil;
/* Index of the first key that has no binding.
It is useless to try fkey.start larger than that. */
@@ -9032,7 +9031,7 @@ static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object,
keybuf with its symbol, or if the sequence starts with a mouse
click and we need to switch buffers, we jump back here to rebuild
the initial keymaps from the current buffer. */
- current_binding = active_maps (first_event);
+ current_binding = active_maps (mock_input > 0 ? keybuf[0] : Qnil);
/* Start from the beginning in keybuf. */
t = 0;
@@ -9279,10 +9278,9 @@ static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object,
}
}
- if (NILP (first_event))
+ if (t == 0)
{
- first_event = key;
- /* Even if first_event does not specify a particular
+ /* Even if key does not specify a particular
window/position, it's important to recompute the maps here
since a long time might have passed since we entered
read_key_sequence, and a timer (or process-filter or
@@ -9292,7 +9290,7 @@ static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object,
&& (XBUFFER (XWINDOW (selected_window)->contents)
!= current_buffer))
Fset_buffer (XWINDOW (selected_window)->contents);
- current_binding = active_maps (first_event);
+ current_binding = active_maps (key);
}
GROW_RAW_KEYBUF;
----------------------------------------------------------------
Gesendet mit Telekom Mail <https://t-online.de/email-kostenlos> - kostenlos und sicher für alle!
next prev parent reply other threads:[~2017-11-13 13:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 13:45 bug#29104: [PATCH]: xterm-mouse-mode clicks in the modeline dont use the keymap properties of the modeline strings Olaf Rogalsky
2017-11-06 23:47 ` Olaf Rogalsky
2017-11-11 9:44 ` Eli Zaretskii
2017-11-13 11:33 ` bug#29104: AW: " olaf.rogalsky
2017-11-13 13:57 ` olaf.rogalsky [this message]
2017-11-19 4:24 ` Stefan Monnier
2017-11-19 15:50 ` Eli Zaretskii
2017-11-20 13:26 ` Stefan Monnier
2017-11-20 17:15 ` Eli Zaretskii
2017-11-20 18:06 ` Stefan Monnier
2017-11-19 21:14 ` Olaf Rogalsky
2017-11-18 9:52 ` Eli Zaretskii
2017-11-18 14:43 ` Stefan Monnier
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=1510581474048.7762584.ec34b569bff8873067a3b84e08b73b2215d5dd1a@spica.telekom.de \
--to=olaf.rogalsky@t-online.de \
--cc=29104@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.