branch: externals/transient
commit fdeb5ba0964a1fe62762b44852e317101e1c2a9b
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    Reapply "Use Cond-Let's when$"
    
    This reverts commit 1d2710c7f8bba962bfbe6502d76158c2150840c1.
---
 lisp/transient.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index e40459a54a..02034c6c71 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2277,9 +2277,9 @@ of the corresponding object."
                  (error "Cannot bind %S to %s and also %s"
                         (string-trim key) cmd alt))
                 ((define-key map kbd cmd))))))
-    (when-let ((b (keymap-lookup map "-"))) (keymap-set map "<kp-subtract>" b))
-    (when-let ((b (keymap-lookup map "="))) (keymap-set map "<kp-equal>" b))
-    (when-let ((b (keymap-lookup map "+"))) (keymap-set map "<kp-add>" b))
+    (when$ (keymap-lookup map "-") (keymap-set map "<kp-subtract>" $))
+    (when$ (keymap-lookup map "=") (keymap-set map "<kp-equal>" $))
+    (when$ (keymap-lookup map "+") (keymap-set map "<kp-add>" $))
     (when transient-enable-popup-navigation
       ;; `transient--make-redisplay-map' maps only over bindings that are
       ;; directly in the base keymap, so that cannot be a composed keymap.
@@ -5484,6 +5484,7 @@ as stand-in for elements of exhausted lists."
 ;;   ("and$"         . "cond-let--and$")
 ;;   ("and-let"      . "cond-let--and-let")
 ;;   ("if-let"       . "cond-let--if-let")
+;;   ("when$"        . "cond-let--when$")
 ;;   ("when-let"     . "cond-let--when-let")
 ;;   ("while-let"    . "cond-let--while-let"))
 ;; indent-tabs-mode: nil

Reply via email to