From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "olaf.rogalsky\@t-online.de" <olaf.rogalsky@t-online.de>
Cc: "29104@debbugs.gnu.org" <29104-done@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: Sat, 18 Nov 2017 23:24:49 -0500 [thread overview]
Message-ID: <jwv1skuncb2.fsf-monnier+bug#29104@gnu.org> (raw)
In-Reply-To: <1510581474048.7762584.ec34b569bff8873067a3b84e08b73b2215d5dd1a@spica.telekom.de> (olaf's message of "Mon, 13 Nov 2017 14:57:54 +0100 (CET)")
> 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.
Indeed, I got a similar patch (see below) by simply moving your
assignment to first_event from "before the `goto replay_sequence`" to
after it (i.e. after the replay_sequence label).
Your patch looks about as good as mine. I think they're both better
than your first patch because they fix the problem in a single place
(The Right Place).
I installed mine because it's shorter and looks more "obviously safe"
to me. Thanks a lot for tracking it down!
Stefan
diff --git a/src/keyboard.c b/src/keyboard.c
index 399149ae97..6b7a6bfa74 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8919,7 +8919,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
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. */
@@ -9029,6 +9028,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
starting_buffer = current_buffer;
first_unbound = bufsize + 1;
+ Lisp_Object first_event = mock_input > 0 ? keybuf[0] : Qnil;
/* Build our list of keymaps.
If we recognize a function key and replace its escape sequence in
next prev parent reply other threads:[~2017-11-19 4:24 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
2017-11-19 4:24 ` Stefan Monnier [this message]
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='jwv1skuncb2.fsf-monnier+bug#29104@gnu.org' \
--to=monnier@iro.umontreal.ca \
--cc=29104-done@debbugs.gnu.org \
--cc=olaf.rogalsky@t-online.de \
/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.