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

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

[elpa] externals/transient 69f42f9e89 334/366: transient--make-predicate


From: Jonas Bernoulli
Subject: [elpa] externals/transient 69f42f9e89 334/366: transient--make-predicate-map: Cosmetics
Date: Tue, 25 Jan 2022 18:54:52 -0500 (EST)

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

    transient--make-predicate-map: Cosmetics
---
 lisp/transient.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index e1f5f38808..9addbafa4c 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1640,7 +1640,7 @@ of the corresponding object.")
     (set-keymap-parent map transient-predicate-map)
     (dolist (obj transient--suffixes)
       (let* ((cmd (oref obj command))
-             (sub-prefix (and (symbolp cmd) (get cmd 'transient--prefix)))
+             (sub-prefix (and (symbolp cmd) (get cmd 'transient--prefix) t))
              (sym (transient--suffix-symbol cmd)))
         (cond
          ((oref obj inapt)
@@ -1648,13 +1648,13 @@ of the corresponding object.")
          ((slot-boundp obj 'transient)
           (define-key map (vector sym)
             (let ((do (oref obj transient)))
-              (pcase do
-                (`t (cond (sub-prefix #'transient--do-replace)
-                          ((cl-typep obj 'transient-infix)
-                           #'transient--do-stay)
-                          (t #'transient--do-call)))
-                (`nil 'transient--do-exit)
-                (_ do)))))
+              (pcase (list do sub-prefix)
+                (`(t     t) #'transient--do-replace)
+                (`(t   nil) (if (cl-typep obj 'transient-infix)
+                                #'transient--do-stay
+                              #'transient--do-call))
+                (`(nil  ,_) #'transient--do-exit)
+                (_          do)))))
          ((not (lookup-key transient-predicate-map (vector sym)))
           (define-key map (vector sym)
             (if sub-prefix



reply via email to

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