From dd970cd464570c85ca3492706b6239029876556d Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 7 Sep 2023 16:40:31 +0200 Subject: [PATCH] Compile suffix commands that are defined inside prefix definitions Closes #256. --- lisp/transient.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/transient.el b/lisp/transient.el index a61179f2..67bcefd0 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1088,7 +1088,10 @@ example, sets a variable, use `transient-define-infix' instead. `(prog1 ',sym (put ',sym 'interactive-only t) (put ',sym 'command-modes (list 'not-a-mode)) - (defalias ',sym ,(macroexp-quote cmd))))))) + (defalias ',sym + ,(if (eq (car-safe cmd) 'lambda) + cmd + (macroexp-quote cmd)))))))) ((or (stringp car) (and car (listp car))) (let ((arg pop)