summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-04-01 23:45:23 +0200
committerJonas Bernoulli <jonas@bernoul.li>2026-04-01 23:45:23 +0200
commit8b14203107950d6eba0e17d14867e05547725219 (patch)
tree5c1653e617d67ecce1aea029554bc93d809045cc /lisp
parent245a1787a4e21892c592b9977c910a6cbac5bc04 (diff)
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/transient.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index 03352ed..cfedea0 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)