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

    Revert "Use Cond-Let's when$"
    
    This reverts commit 158a773d802ea89f19483444f7ae5e2d96f4d13b,
    because our package managers aren't good enough, see magit#5460.
---
 lisp/transient.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index b44763c1f4..41747a11dc 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2272,9 +2272,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$ (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-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 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.
@@ -5479,7 +5479,6 @@ 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