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

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

[elpa] externals/transient 919fc6653d 048/366: transient--make-predicate


From: Jonas Bernoulli
Subject: [elpa] externals/transient 919fc6653d 048/366: transient--make-predicate-map: Always respect transient slot
Date: Tue, 25 Jan 2022 18:54:25 -0500 (EST)

branch: externals/transient
commit 919fc6653df112679f589a6ee76a8bfdb19b7a01
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@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)



reply via email to

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