emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 56d1f42: Improve handling of non-character events in input meth


From: Eli Zaretskii
Subject: emacs-28 56d1f42: Improve handling of non-character events in input methods
Date: Tue, 12 Oct 2021 12:51:46 -0400 (EDT)

branch: emacs-28
commit 56d1f42f3007c9b4be8ddb6322e8e2ed21d5da95
Author: Gregory Heytings <gregory@heytings.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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.
---
 lisp/international/quail.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 50ff307..ee935b1 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]