Improve handling of non-character events in input methods

* lisp/international/quail.el (quail-add-unread-command-events):
Handle non-vector event arguments.  Fixes bug#51118.
This commit is contained in:
Gregory Heytings 2021-10-12 12:50:21 +00:00 committed by Eli Zaretskii
parent 3fbe6fd367
commit 56d1f42f30

View file

@ -1382,6 +1382,8 @@ a cons cell of the form (no-record . KEY).
If KEY is a vector of events, the events in the vector are prepended
to `unread-command-events', after converting each event to a cons cell
of the form (no-record . EVENT).
If KEY is an event, it is prepended to `unread-command-events' as a cons
cell of the form (no-record . EVENT).
If RESET is non-nil, the events in `unread-command-events' are first
discarded, i.e. in this case KEY will end up being the only key
in `unread-command-events'."
@ -1390,7 +1392,7 @@ in `unread-command-events'."
(if (characterp key)
(cons (cons 'no-record key) unread-command-events)
(append (mapcan (lambda (e) (list (cons 'no-record e)))
(append key nil))
(append (if (vectorp key) key (vector key)) nil))
unread-command-events))))
(defun quail-start-translation (key)