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

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

[elpa] externals/transient 1b7f9be7b9 6/8: transient-suffix-object: Drop


From: Jonas Bernoulli
Subject: [elpa] externals/transient 1b7f9be7b9 6/8: transient-suffix-object: Drop faulty fallback behavior
Date: Sat, 2 Nov 2024 09:09:39 -0400 (EDT)

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

    transient-suffix-object: Drop faulty fallback behavior
    
    We can only forgo looking for an object whose binding matches if there
    is only a single object whose command matches.  If the binding match
    fails, there is a bug somewhere, such as the one fixed in the previous
    commit.
---
 lisp/transient.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index cb4243d511..9623345e82 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1702,13 +1702,14 @@ probably use this instead:
                         this-command))))
             (or transient--suffixes
                 transient-current-suffixes))))
-      (or (and (cdr suffixes)
-               (cl-find-if
-                (lambda (obj)
-                  (equal (listify-key-sequence (transient--kbd (oref obj key)))
-                         (listify-key-sequence (this-command-keys))))
-                suffixes))
-          (car suffixes))))
+      (or (if (cdr suffixes)
+              (cl-find-if
+               (lambda (obj)
+                 (equal (listify-key-sequence (transient--kbd (oref obj key)))
+                        (listify-key-sequence (this-command-keys))))
+               suffixes)
+            (car suffixes))
+          (error "BUG: Cannot determine suffix object"))))
    ((and-let* ((obj (transient--suffix-prototype (or command this-command)))
                (obj (clone obj)))
       (progn ; work around debbugs#31840



reply via email to

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