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

    transient--delete-window: Recover from more window misconfigurations
    
    Make sure transient state is exited properly (except that the window
    may remain visible of course).  We already demoted such errors, in one
    place in this function, where we expected such misconfigurations could
    cause an error, but the problem may not show up until these later
    steps, so wrap those too.
    
    Re #429.
---
 lisp/transient.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 03352ed09c..cfedea08c2 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -4663,10 +4663,12 @@ have a history of their own.")
            (if (window-parent win)
                (delete-window win)
              (delete-frame (window-frame win) t)))))
-      (when remain-in-minibuffer-window
-        (select-window remain-in-minibuffer-window))))
-  (when (buffer-live-p transient--buffer)
-    (kill-buffer transient--buffer))
+      (with-demoted-errors "Error while exiting transient [1]: %S"
+        (when remain-in-minibuffer-window
+          (select-window remain-in-minibuffer-window)))))
+  (with-demoted-errors "Error while exiting transient [2]: %S"
+    (when (buffer-live-p transient--buffer)
+      (kill-buffer transient--buffer)))
   (setq transient--buffer nil))
 
 (defun transient--preserve-window-p (&optional nohide)

Reply via email to