feature/popup: (another) possible fix for elusive 'at top level' bug #436

This commit is contained in:
Henrik Lissner 2018-03-19 04:45:04 -04:00
parent 4a29825e0d
commit 221061b599
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -14,8 +14,8 @@
"Tries to kill BUFFER, as was requested by a transient timer. If it fails, eg.
the buffer is visible, then set another timer and try again later."
(when (buffer-live-p buffer)
(with-temp-buffer
(let ((kill-buffer-hook (remq '+popup|kill-buffer-hook kill-buffer-hook)))
(let ((inhibit-quit t)
(kill-buffer-hook (remq '+popup|kill-buffer-hook kill-buffer-hook)))
(cond ((eq ttl 0)
(kill-buffer buffer))
((get-buffer-window buffer)
@ -26,7 +26,7 @@ the buffer is visible, then set another timer and try again later."
(let (confirm-kill-processes)
(when-let* ((process (get-buffer-process (current-buffer))))
(kill-process process)))
(kill-buffer buffer))))))))
(kill-buffer buffer)))))))
(defun +popup--init (window &optional alist)
"Initializes a popup window. Run any time a popup is opened. It sets the