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

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

[elpa] externals/transient dd69194d95 1/2: Restore ability to change a p


From: Jonas Bernoulli
Subject: [elpa] externals/transient dd69194d95 1/2: Restore ability to change a prefix's level
Date: Sun, 8 Dec 2024 17:28:21 -0500 (EST)

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

    Restore ability to change a prefix's level
    
    In [1: 1b7f9be7] we intentionally started signaling an error in
    `transient-suffix-object' if no object can be determined, to learn
    whether there actually are any callers for which it actually make
    sense to return nil instead.
    
    Now we know about one, but I am still not sure whether that should
    be a valid use-case, so we keep the error for now, but ignore the
    error in this one case.
    
    Closes #337.
    
    1: 2024-11-02 1b7f9be7b9fbc8acb5d71f028b19e1f78d9dd090
       transient-suffix-object: Drop faulty fallback behavior
---
 CHANGELOG         | 7 +++++++
 lisp/transient.el | 6 +++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index fc48f41bc8..1fd6bde5b7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,11 @@
 # -*- mode: org -*-
+* v0.8.1    UNRELEASED
+
+Bug fixes:
+
+- Interactively setting the level of a transient prefix resulted in
+  an error.  #337.
+
 * v0.8.0    2024-12-06
 
 - While the minibuffer is in use, the menu window is now hidden by
diff --git a/lisp/transient.el b/lisp/transient.el
index d3b55b887f..f09739f513 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1760,6 +1760,9 @@ probably use this instead:
           ;; impossible to disambiguate redundant bindings.
           (if command
               (car suffixes)
+            ;; TODO Decide whether it is legimate to use this function
+            ;; as a predicate, and also whether to return an object for
+            ;; suffixes common to all prefixes.  See #29 and #337.
             (error "BUG: Cannot determine suffix object")))))
    ((and-let* ((obj (transient--suffix-prototype (or command this-command)))
                (obj (clone obj)))
@@ -2418,7 +2421,8 @@ value.  Otherwise return CHILDREN as is.")
        ((not (transient--edebug-command-p))
         (setq this-command 'transient-undefined))))
      ((and transient--editp
-           (transient-suffix-object)
+           ;; See TODO in that function.
+           (ignore-errors (transient-suffix-object))
            (not (memq this-command '(transient-quit-one
                                      transient-quit-all
                                      transient-help))))



reply via email to

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