From 24aabfc8e025f1c51e9b6f5907288b6a40d2d33d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 11 May 2020 19:43:52 -0400 Subject: [PATCH] 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 --- core/core-lib.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 0dd055f72..85146ea4c 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -157,7 +157,7 @@ at the values with which this function was called." A factory for quickly producing interaction commands, particularly for keybinds or aliases." (declare (doc-string 1) (pure t) (side-effect-free t)) - `(lambda () (interactive) ,@body)) + `(lambda (&rest _) (interactive) ,@body)) (defalias 'lambda! 'λ!) (defun λ!! (command &optional arg) @@ -165,7 +165,7 @@ or aliases." A factory for quickly producing interactive, prefixed commands for keybinds or aliases." (declare (doc-string 1) (pure t) (side-effect-free t)) - (lambda () (interactive) + (lambda (&rest _) (interactive) (let ((current-prefix-arg arg)) (call-interactively command)))) (defalias 'lambda!! 'λ!!)