summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG8
-rw-r--r--lisp/transient.el7
2 files changed, 14 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 269d157..914afc2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,12 @@
# -*- mode: org -*-
+* v0.7.7 UNRELEASED
+
+Bug fix:
+
+- Fix a regression introduced by the previous commit, which broke
+ dynamic prefixes that use a ~:setup-children~ function to prepare
+ their suffixes. #313
+
* v0.7.6 2024-10-01
- ~transient-active-prefix~ now accepts a single prefix symbol, in place
diff --git a/lisp/transient.el b/lisp/transient.el
index d5d422a..e0efe70 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1187,8 +1187,13 @@ commands are aliases for."
(error "Need command, argument, `:info' or `:info*'; got `%s'" car))
((symbolp car)
(setq args (plist-put args :command (macroexp-quote pop))))
+ ;; During macro-expansion this is expected to be a `lambda'
+ ;; expression. When this is called from a `:setup-children'
+ ;; function, it may also be a byte-code function object or a
+ ;; compiled function. However, we never treat a string as a
+ ;; command, so we have to check for that explicitly.
((and (commandp car)
- (eq (car-safe car) 'lambda))
+ (not (stringp car)))
(let ((cmd pop)
(sym (intern
(format