branch: elpa/transient
commit 00112c11e5d94e018cb33aae2d15b5543be1cad8
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    transient--init-suffix: Load autoloaded command earlier
    
    Do so before trying to access the prototype suffix object.
---
 lisp/transient.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 91ad2481e4..13c22598a9 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2369,6 +2369,7 @@ value.  Otherwise return CHILDREN as is.")
 (defun transient--init-suffix (levels spec parent)
   (pcase-let* ((`(,level ,class ,args) spec)
                (cmd (plist-get args :command))
+               (_ (transient--load-command-if-autoload cmd))
                (key (transient--kbd (plist-get args :key)))
                (proto (and cmd (transient--suffix-prototype cmd)))
                (level (or (alist-get (cons cmd key) levels nil nil #'equal)
@@ -2376,7 +2377,6 @@ value.  Otherwise return CHILDREN as is.")
                           level
                           (and proto (oref proto level))
                           transient--default-child-level)))
-    (transient--load-command-if-autoload cmd)
     (when (transient--use-level-p level)
       (let ((obj (if (child-of-class-p class 'transient-information)
                      (apply class :parent parent :level level args)

Reply via email to