branch: externals/transient
commit b44be23dba7fc3542cc48ab1fe8c05024626499b
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    Initialize value and scope of inapt suffixes
    
    Instead filter out their values in `transient-prefix-value' and
    `transient-get-value'.  (In the latter case we started doing that
    a few commits ago.)
    
    Re #407.
---
 lisp/transient.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index a4d52ad3ef..ba061a63b3 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2554,10 +2554,10 @@ value.  Otherwise return CHILDREN as is.")
         (unless (cl-typep obj 'transient-information)
           (transient--init-suffix-key obj))
         (when (transient--use-suffix-p obj)
-          (if (transient--inapt-suffix-p obj)
-              (oset obj inapt t)
-            (transient-init-scope obj)
-            (transient-init-value obj))
+          (when (transient--inapt-suffix-p obj)
+            (oset obj inapt t))
+          (transient-init-scope obj)
+          (transient-init-value obj)
           (unless (cl-typep def 'transient-information)
             (push obj transient--suffixes))
           (list obj))))))
@@ -4059,7 +4059,9 @@ for `transient-args'.
 
 This method uses `transient-suffixes' (which see) to determine the
 suffix objects and then extracts the value(s) from those objects."
-  (mapcan #'transient--get-wrapped-value
+  (mapcan (lambda (obj)
+            (and (not (oref obj inapt))
+                 (transient--get-wrapped-value obj)))
           (transient-suffixes (oref obj command))))
 
 (defun transient-suffixes (prefix)

Reply via email to