diff --git a/lisp/subr.el b/lisp/subr.el index 682e156de12..036f414262a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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) diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 791b06f9edf..b99328459d6 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -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.