branch: externals/transient
commit 69f42f9e896b0a2b96eebb9c5e0bc0e9e2a13aaa
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
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