From: Po Lu Date: Fri, 8 Apr 2022 00:22:40 +0000 (+0800) Subject: Fix reporting of last-event-device for synthetic events X-Git-Tag: emacs-29.0.90~1931^2~714 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6ac7fa7e78b84a6fbdf12a63d927ad55bacd8d91;p=emacs.git Fix reporting of last-event-device for synthetic events * src/keyboard.c (read_char): Clear `last-event-device' earlier. --- diff --git a/src/keyboard.c b/src/keyboard.c index 8142ffec2df..01274b4d4a8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2465,6 +2465,7 @@ read_char (int commandflag, Lisp_Object map, else reread = false; + Vlast_event_device = Qnil; if (CONSP (Vunread_command_events)) { @@ -2525,8 +2526,6 @@ read_char (int commandflag, Lisp_Object map, goto reread_for_input_method; } - Vlast_event_device = Qnil; - if (!NILP (Vexecuting_kbd_macro)) { /* We set this to Qmacro; since that's not a frame, nobody will