]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't inhibit quit in Gnus when prefetching articles
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 28 Jun 2019 10:01:46 +0000 (12:01 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 28 Jun 2019 10:01:46 +0000 (12:01 +0200)
* lisp/gnus/gnus-async.el (gnus-async-prefetch-next): Don't
inhibit quit when running `gnus-async-prefetch-article'.

lisp/gnus/gnus-async.el

index e6fe2db3555bd4d194be9fc3cbb830cb84a65983..57f667c5e50096807f25783c409e7ad09abaa67f 100644 (file)
@@ -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."