From 221061b599f5dfb5c93d4b8788af0b06bda24425 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 19 Mar 2018 04:45:04 -0400 Subject: [PATCH] feature/popup: (another) possible fix for elusive 'at top level' bug #436 --- modules/feature/popup/autoload.el | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/feature/popup/autoload.el b/modules/feature/popup/autoload.el index e7958ae38..342e4c75f 100644 --- a/modules/feature/popup/autoload.el +++ b/modules/feature/popup/autoload.el @@ -14,19 +14,19 @@ "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))) - (cond ((eq ttl 0) - (kill-buffer buffer)) - ((get-buffer-window buffer) - (with-current-buffer buffer - (setq +popup--timer - (run-at-time ttl nil #'+popup--kill-buffer buffer ttl)))) - ((with-demoted-errors "Error killing transient buffer: %s" - (let (confirm-kill-processes) - (when-let* ((process (get-buffer-process (current-buffer)))) - (kill-process process))) - (kill-buffer buffer)))))))) + (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) + (with-current-buffer buffer + (setq +popup--timer + (run-at-time ttl nil #'+popup--kill-buffer buffer ttl)))) + ((with-demoted-errors "Error killing transient buffer: %s" + (let (confirm-kill-processes) + (when-let* ((process (get-buffer-process (current-buffer)))) + (kill-process process))) + (kill-buffer buffer))))))) (defun +popup--init (window &optional alist) "Initializes a popup window. Run any time a popup is opened. It sets the