[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 30a6b1f 1/2: Fix recording of events pushed onto un
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 30a6b1f 1/2: Fix recording of events pushed onto unread-command-events |
Date: |
Mon, 10 Aug 2015 18:16:33 +0000 |
branch: master
commit 30a6b1f81412044aa7dda5573b0142a0a03c4fd3
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix recording of events pushed onto unread-command-events
* src/keyboard.c (read_char): Make sure events read from
unread-command-events and unread-post-input-method-events are
always recorded by record_char. Reported by David Kastrup
<address@hidden>, see
http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00193.html.
---
src/keyboard.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/keyboard.c b/src/keyboard.c
index e4fe5b9..f670da3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2387,7 +2387,7 @@ read_char (int commandflag, Lisp_Object map,
Lisp_Object tem, save;
volatile Lisp_Object previous_echo_area_message;
volatile Lisp_Object also_record;
- volatile bool reread;
+ volatile bool reread, recorded;
struct gcpro gcpro1, gcpro2;
bool volatile polling_stopped_here = 0;
struct kboard *orig_kboard = current_kboard;
@@ -2405,6 +2405,8 @@ read_char (int commandflag, Lisp_Object map,
retry:
+ recorded = false;
+
if (CONSP (Vunread_post_input_method_events))
{
c = XCAR (Vunread_post_input_method_events);
@@ -2994,6 +2996,7 @@ read_char (int commandflag, Lisp_Object map,
/* Store these characters into recent_keys, the dribble file if any,
and the keyboard macro being defined, if any. */
record_char (c);
+ recorded = true;
if (! NILP (also_record))
record_char (also_record);
@@ -3129,6 +3132,14 @@ read_char (int commandflag, Lisp_Object map,
Vunread_post_input_method_events
= nconc2 (XCDR (tem), Vunread_post_input_method_events);
}
+ /* When we consume events from the various unread-*-events lists, we
+ bypass the code that records input, so record these events now if
+ they were not recorded already. */
+ if (!recorded)
+ {
+ record_char (c);
+ recorded = true;
+ }
reread_first:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 30a6b1f 1/2: Fix recording of events pushed onto unread-command-events,
Eli Zaretskii <=