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

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

[elpa] externals/transient 4f0bd45d88 166/366: transient--make-predicate


From: Jonas Bernoulli
Subject: [elpa] externals/transient 4f0bd45d88 166/366: transient--make-predicate-map: Cosmetics
Date: Tue, 25 Jan 2022 18:54:37 -0500 (EST)

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

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

diff --git a/lisp/transient.el b/lisp/transient.el
index d5d162fa76..c5dcc687fe 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1444,21 +1444,22 @@ of the corresponding object.")
     (dolist (obj transient--suffixes)
       (let* ((cmd (transient--suffix-command obj))
              (sub-prefix (and (symbolp cmd) (get cmd 'transient--prefix))))
-        (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)
-                    'transient--do-exit)))))))
+        (cond
+         ((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)))))
+         ((not (lookup-key transient-predicate-map (vector cmd)))
+          (define-key map (vector cmd)
+            (if sub-prefix
+                'transient--do-replace
+              (or (oref transient--prefix transient-suffix)
+                  'transient--do-exit)))))))
     map))
 
 (defun transient--make-redisplay-map ()



reply via email to

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