summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/basic.el b/basic.el
index bfb8a87..b2ab6d0 100644
--- a/basic.el
+++ b/basic.el
@@ -239,6 +239,27 @@ window, then also delete the selected window."
((window-minibuffer-p (selected-window))
;; this is the same as calling `abort-recursive-edit'.
(throw 'exit t))
+ ((derived-mode-p 'pdf-view-mode)
+ ;; We also want to kill the associated timer, if any.
+ (mapc
+ (lambda (timer)
+ (cond
+ ((and
+ (eq (timer--function timer) 'pdf-cache--prefetch-start)
+ (listp (timer--args timer))
+ (memq (current-buffer) (timer--args timer)))
+ (setq timer-idle-list (delq timer timer-idle-list)))))
+ timer-idle-list)
+ (mapc
+ (lambda (timer)
+ (cond
+ ((and
+ (eq (timer--function timer) 'pdf-cache--prefetch-start)
+ (listp (timer--args timer))
+ (memq (current-buffer) (timer--args timer)))
+ (setq timer-list (delq timer timer-list)))))
+ timer-list)
+ (kill-buffer (current-buffer)))
(t (kill-buffer (current-buffer))))
(cond
((and arg (not (one-window-p t)))