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

    transient--quit-commands: New variable
    
    This lists commands that quit a menu.  I.e., not `transient-quit-seq'.
---
 lisp/transient.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 8ff4bd5308..e5539d04cf 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1879,6 +1879,10 @@ This is bound while the suffixes are drawn in the 
transient buffer.")
     mwheel-scroll
     scroll-bar-toolkit-scroll))
 
+(defvar transient--quit-commands
+  '(transient-quit-one
+    transient-quit-all))
+
 ;;; Identities
 
 (defun transient-active-prefix (&optional prefixes)
@@ -2715,8 +2719,7 @@ value.  Otherwise return CHILDREN as is.")
      ((memq this-command '(transient-update transient-quit-seq))
       (transient--pop-keymap 'transient--redisplay-map))
      ((and transient--helpp
-           (not (memq this-command '(transient-quit-one
-                                     transient-quit-all))))
+           (not (memq this-command transient--quit-commands)))
       (cond
        ((transient-help)
         (transient--do-suspend)
@@ -2726,9 +2729,8 @@ value.  Otherwise return CHILDREN as is.")
         (setq this-command 'transient-undefined))))
      ((and transient--editp
            (transient-suffix-object)
-           (not (memq this-command '(transient-quit-one
-                                     transient-quit-all
-                                     transient-help))))
+           (not (memq this-command
+                      (cons 'transient-help transient--quit-commands))))
       (setq this-command 'transient-set-level)
       (transient--wrap-command))
      (t

Reply via email to