mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Fix #3098: wrong-number-of-args on some interactive closures
It appears key-translation-map keybinds are passed an argument, but `lambda!` and `lambda!!` produce 0-arity closures. Closes #3099
This commit is contained in:
@ -157,7 +157,7 @@ at the values with which this function was called."
|
|||||||
A factory for quickly producing interaction commands, particularly for keybinds
|
A factory for quickly producing interaction commands, particularly for keybinds
|
||||||
or aliases."
|
or aliases."
|
||||||
(declare (doc-string 1) (pure t) (side-effect-free t))
|
(declare (doc-string 1) (pure t) (side-effect-free t))
|
||||||
`(lambda () (interactive) ,@body))
|
`(lambda (&rest _) (interactive) ,@body))
|
||||||
(defalias 'lambda! 'λ!)
|
(defalias 'lambda! 'λ!)
|
||||||
|
|
||||||
(defun λ!! (command &optional arg)
|
(defun λ!! (command &optional arg)
|
||||||
@ -165,7 +165,7 @@ or aliases."
|
|||||||
A factory for quickly producing interactive, prefixed commands for keybinds or
|
A factory for quickly producing interactive, prefixed commands for keybinds or
|
||||||
aliases."
|
aliases."
|
||||||
(declare (doc-string 1) (pure t) (side-effect-free t))
|
(declare (doc-string 1) (pure t) (side-effect-free t))
|
||||||
(lambda () (interactive)
|
(lambda (&rest _) (interactive)
|
||||||
(let ((current-prefix-arg arg))
|
(let ((current-prefix-arg arg))
|
||||||
(call-interactively command))))
|
(call-interactively command))))
|
||||||
(defalias 'lambda!! 'λ!!)
|
(defalias 'lambda!! 'λ!!)
|
||||||
|
Reference in New Issue
Block a user