emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/transient 8a80e9526b 4/8: transient-information*: New c


From: Jonas Bernoulli
Subject: [elpa] externals/transient 8a80e9526b 4/8: transient-information*: New class
Date: Mon, 29 Apr 2024 09:40:41 -0400 (EDT)

branch: externals/transient
commit 8a80e9526bd10f9bd6aba07f099f7351301e3e39
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    transient-information*: New class
---
 lisp/transient.el | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 5e9d533bcb..586aeda239 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -779,8 +779,13 @@ slot is non-nil."
 (defclass transient-information (transient-suffix)
   ((format :initform " %k %d")
    (key    :initform " "))
-  "Display-only information.
-A suffix object with no associated command.")
+  "Display-only information, aligned with suffix keys.
+Technically a suffix object with no associated command.")
+
+(defclass transient-information* (transient-information)
+  ((format :initform " %d"))
+  "Display-only information, aligned with suffix descriptions.
+Technically a suffix object with no associated command.")
 
 (defclass transient-infix (transient-suffix)
   ((transient                         :initform t)
@@ -837,6 +842,7 @@ They become the value of this argument.")
    (hide           :initarg :hide           :initform nil)
    (description    :initarg :description    :initform nil)
    (pad-keys       :initarg :pad-keys       :initform nil)
+   (info-format    :initarg :info-format    :initform nil)
    (setup-children :initarg :setup-children))
   "Abstract superclass of all group classes."
   :abstract t)
@@ -1153,9 +1159,9 @@ commands are aliases for."
              (commandp (cadr spec)))
         (setq args (plist-put args :description (macroexp-quote pop)))))
       (cond
-       ((eq car :info))
+       ((memq car '(:info :info*)))
        ((keywordp car)
-        (error "Need command or `:info', got `%s'" car))
+        (error "Need command, `:info' or `:info*', got `%s'" car))
        ((symbolp car)
         (setq args (plist-put args :command (macroexp-quote pop))))
        ((and (commandp car)
@@ -1215,6 +1221,9 @@ commands are aliases for."
                 ((eq key :info)
                  (setq class 'transient-information)
                  (setq args (plist-put args :description val)))
+                ((eq key :info*)
+                 (setq class 'transient-information*)
+                 (setq args (plist-put args :description val)))
                 ((eq (car-safe val) '\,)
                  (setq args (plist-put args key (cadr val))))
                 ((or (symbolp val)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]