(listify-key-sequence): Fix breakage with unibyte chars
* lisp/subr.el (listify-key-sequence): The funny "7th bit is Meta" applies only to unibyte strings. * test/lisp/subr-tests.el (subr-listify-key-sequence): New test.
This commit is contained in:
@@ -1806,7 +1806,7 @@ See also `current-global-map'.")
|
||||
(defun listify-key-sequence (key)
|
||||
"Convert a key sequence to a list of events."
|
||||
(declare (side-effect-free t))
|
||||
(if (vectorp key)
|
||||
(if (or (vectorp key) (multibyte-string-p key))
|
||||
(append key nil)
|
||||
(mapcar (lambda (c)
|
||||
(if (> c 127)
|
||||
|
||||
@@ -433,6 +433,9 @@
|
||||
(should (eq (global-key-binding "x") 'self-insert-command))
|
||||
(should-not (global-key-binding [f12])))
|
||||
|
||||
(ert-deftest subr-listify-key-sequence ()
|
||||
(should (equal (listify-key-sequence "ŕ°") '(?ŕ ?°))))
|
||||
|
||||
|
||||
;;;; Mode hooks.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user