emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master a7682bc: Don't inhibit quit in Gnus when prefetchin


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master a7682bc: Don't inhibit quit in Gnus when prefetching articles
Date: Fri, 28 Jun 2019 06:01:57 -0400 (EDT)

branch: master
commit a7682bce3cfc7661acf6f395c0558f2202b4d78d
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Don't inhibit quit in Gnus when prefetching articles
    
    * lisp/gnus/gnus-async.el (gnus-async-prefetch-next): Don't
    inhibit quit when running `gnus-async-prefetch-article'.
---
 lisp/gnus/gnus-async.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el
index e6fe2db..57f667c 100644
--- a/lisp/gnus/gnus-async.el
+++ b/lisp/gnus/gnus-async.el
@@ -141,8 +141,15 @@ that was fetched."
              (cancel-timer 'gnus-async-timer)))
          (setq gnus-async-timer
                (run-with-idle-timer
-                0.1 nil #'gnus-async-prefetch-article
-                group (gnus-data-number next) summary)))))))
+                0.1 nil
+                (lambda ()
+                  ;; When running from a timer, `C-g' is inhibited.
+                  ;; But the prefetch action may (when there's a
+                  ;; network problem or the like) hang (or take a
+                  ;; long time), so allow quitting anyway.
+                  (let ((inhibit-quit nil))
+                    (gnus-async-prefetch-article
+                     group (gnus-data-number next) summary))))))))))
 
 (defun gnus-async-prefetch-article (group article summary &optional next)
   "Possibly prefetch several articles starting with ARTICLE."



reply via email to

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