Fix wrong-number-of-args error from cmd!! macro

This commit is contained in:
Henrik Lissner 2020-07-24 18:17:33 -04:00
parent 7a276dbf6b
commit 2441d28ad1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -258,7 +258,10 @@ aliases."
(declare (doc-string 1) (pure t) (side-effect-free t))
`(lambda (arg &rest _) (interactive "P")
(let ((current-prefix-arg (or ,prefix-arg arg)))
(funcall-interactively ,command ,@args))))
(,(if args
'funcall-interactively
'call-interactively)
,command ,@args))))
(defmacro cmds! (&rest branches)
"Expands to a `menu-item' dispatcher for keybinds."