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

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

[elpa] externals/transient c7ad1f01f4 080/366: transient--delete-window:


From: Jonas Bernoulli
Subject: [elpa] externals/transient c7ad1f01f4 080/366: transient--delete-window: Protect against misconfiguration
Date: Tue, 25 Jan 2022 18:54:29 -0500 (EST)

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

    transient--delete-window: Protect against misconfiguration
    
    Transient expects the popup buffer to be displayed in a new window.
    If that is not the case, then it won't work properly and this commit
    does not do anything to make it work properly anyway (because that
    is not possible).
    
    Regardless, the user should still be able to exit the transient state
    even when things are broken like that, but doing so failed if the
    transient popup was displayed in the only window because we ended up
    trying to delete window, which is not allowed.  Continue to try to
    kill the transient window, but if that fails, then continue with the
    rest of the exit procedure.
    
    Re #34 #44.
---
 lisp/transient.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index b77060d9eb..891740686f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1609,7 +1609,8 @@ EDIT may be non-nil."
 (defun transient--delete-window ()
   (when (window-live-p transient--window)
     (let ((buf (window-buffer transient--window)))
-      (delete-window transient--window)
+      (with-demoted-errors "Error while exiting transient: %S"
+        (delete-window transient--window))
       (kill-buffer buf))))
 
 (defun transient--export ()



reply via email to

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