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

    define-transient-command: Support :level in suffix definitions
    
    Previously a suffixes level could only be set by putting an
    integer at the beginning of its definition.
---
 lisp/transient.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 95ae0a0ad4..c5304062b6 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -799,9 +799,10 @@ example, sets a variable use `define-infix-command' 
instead.
          (error "Needed command or argument, got %S" car)))
       (while (keywordp car)
         (let ((k pop))
-          (if (eq k :class)
-              (setq class pop)
-            (setq args (plist-put args k pop))))))
+          (cl-case k
+            (:class (setq class pop))
+            (:level (setq level pop))
+            (t (setq args (plist-put args k pop)))))))
     (unless (plist-get args :key)
       (when-let ((shortarg (plist-get args :shortarg)))
         (setq args (plist-put args :key shortarg))))

Reply via email to