1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

Handle after arg correctly in `keymap-set-after'

* lisp/keymap.el (keymap-set-after): AFTER: t means the same as nil,
so just change it to nil.  (Bug#60867)
This commit is contained in:
Robert Pluim 2023-01-19 14:34:10 +01:00
parent 628b624176
commit c7e02eaa3d

View File

@ -186,6 +186,7 @@ a menu, so this function is not useful for non-menu keymaps."
(declare (indent defun)
(compiler-macro (lambda (form) (keymap--compile-check key) form)))
(keymap--check key)
(when (eq after t) (setq after nil)) ; nil and t are treated the same
(when after
(keymap--check after))
(define-key-after keymap (key-parse key) definition