branch: externals/transient commit 919fc6653df112679f589a6ee76a8bfdb19b7a01 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
transient--make-predicate-map: Always respect transient slot If the `transient' slot is bound, then always add a binding. Previously we added no binding if there is a corresponsing binding in `transient-predicate-map'. --- lisp/transient.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/transient.el b/lisp/transient.el index 88d6820d66..247516758b 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1268,16 +1268,17 @@ of the corresponding object.") (dolist (obj transient--suffixes) (let* ((cmd (transient--suffix-command obj)) (sub-prefix (and (symbolp cmd) (get cmd 'transient--prefix)))) - (unless (lookup-key transient-predicate-map (vector cmd)) - (define-key map (vector cmd) - (if (slot-boundp obj 'transient) - (let ((do (oref obj transient))) - (pcase do - (`t (if sub-prefix - 'transient--do-replace - 'transient--do-stay)) - (`nil 'transient--do-exit) - (_ do))) + (if (slot-boundp obj 'transient) + (define-key map (vector cmd) + (let ((do (oref obj transient))) + (pcase do + (`t (if sub-prefix + 'transient--do-replace + 'transient--do-stay)) + (`nil 'transient--do-exit) + (_ do)))) + (unless (lookup-key transient-predicate-map (vector cmd)) + (define-key map (vector cmd) (if sub-prefix 'transient--do-replace (or (oref transient--prefix transient-suffix)