summaryrefslogtreecommitdiff
path: root/test/lisp/subr-tests.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-05-03 16:19:50 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-05-03 16:19:50 +0200
commit41e946f46e23756b7c732efdf3c5152fa8241dde (patch)
tree975f01e7490d4c47878161370b7d4810d8d61a4a /test/lisp/subr-tests.el
parenta4c96147d1875d359db8d7fda3489954046a5db8 (diff)
downloademacs-41e946f46e23756b7c732efdf3c5152fa8241dde.tar.gz
Fix key-parse problem with C-x ( ... sequences
* lisp/keymap.el (key-parse): Move the read-kbd-macro compat code from here... * lisp/subr.el (kbd): ... to here. (And fix the logic, too.) This allows `key-parse' to have a less puzzling result while maintaining backwards compatibility (bug#38775).
Diffstat (limited to 'test/lisp/subr-tests.el')
-rw-r--r--test/lisp/subr-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 62cf2266d61..a4f531ea4e6 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -1053,5 +1053,9 @@ final or penultimate step during initialization."))
(should (equal (string-lines "foo\n\n\nbar" t t)
'("foo\n" "bar"))))
+(defun test-keymap-parse-macros ()
+ (should (equal (key-parse "C-x ( C-d C-x )") [24 40 4 24 41]))
+ (should (equal (kbd "C-x ( C-d C-x )") "")))
+
(provide 'subr-tests)
;;; subr-tests.el ends here