unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23980: 25.0.95; Events put in `unread-command-events' can be wrongly handled
@ 2016-07-14 14:03 Chris Feng
  2017-11-19  9:39 ` Chris Feng
  0 siblings, 1 reply; 15+ messages in thread
From: Chris Feng @ 2016-07-14 14:03 UTC (permalink / raw)
  To: 23980


I encountered a bug in the command loop that when I put an event of the
form (t . EVENT) into `unread-command-events', there is a chance the
event won't get recognized with the message "<t> is undefined".
I did a bit research and found that in keyboard.c `read_char' calls
`read_decoded_event_from_main_queue' (which in turn calls
`read_event_from_main_queue' and `kbd_buffer_get_event') but does not
check if the returned event is from `Vunread_command_events'.
The problem in `read_char' can be demonstrated by the following form:

  (progn
    (run-with-timer 1 nil (lambda () (push '(t . 1) unread-command-events)))
    (read-event nil nil 2))

    => '(t . 1)

There is actually another related issue, that for an event returned by
`read_decoded_event_from_main_queue' other than the form (t . EVENT), we
can't tell whether it's from `Vunread_command_events' or not.
If it is, then we should not put it into `this_command_keys'.

Any ideas on how to fix these?





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-12-19 16:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-14 14:03 bug#23980: 25.0.95; Events put in `unread-command-events' can be wrongly handled Chris Feng
2017-11-19  9:39 ` Chris Feng
2018-02-20 15:35   ` Dmitry Gutov
2018-02-20 18:37     ` Eli Zaretskii
2018-02-20 21:16       ` Dmitry Gutov
2018-02-21  4:22         ` Eli Zaretskii
2018-02-21  7:40           ` Chris Feng
2018-02-21 10:47             ` Dmitry Gutov
2018-02-21 12:23               ` Dmitry Gutov
2018-02-21 17:48               ` Eli Zaretskii
2018-02-21 21:45                 ` Dmitry Gutov
2018-02-22  7:39                   ` Eli Zaretskii
2018-12-19 13:54                     ` Dmitry Gutov
2018-12-19 15:27                       ` Eli Zaretskii
2018-12-19 16:07                         ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).