;;; gnus-async.el --- asynchronous support for Gnus
-;; Copyright (C) 1996-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2016 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
that was fetched."
:version "24.1"
:group 'gnus-asynchronous
- :type 'function)
+ :type '(choice (const nil) function))
;;; Internal variables.
(with-current-buffer gnus-summary-buffer
(let ((next (caadr (gnus-data-find-list article))))
(when next
- (if (not (fboundp 'run-with-idle-timer))
- ;; This is either an older Emacs or XEmacs, so we
- ;; do this, which leads to slightly slower article
- ;; buffer display.
- (gnus-async-prefetch-article group next summary)
- (when gnus-async-timer
- (ignore-errors
- (nnheader-cancel-timer 'gnus-async-timer)))
- (setq gnus-async-timer
- (run-with-idle-timer
- 0.1 nil 'gnus-async-prefetch-article
- group next summary))))))))
+ (when gnus-async-timer
+ (ignore-errors
+ (nnheader-cancel-timer 'gnus-async-timer)))
+ (setq gnus-async-timer
+ (run-with-idle-timer
+ 0.1 nil 'gnus-async-prefetch-article
+ group next summary)))))))
(defun gnus-async-prefetch-article (group article summary &optional next)
"Possibly prefetch several articles starting with ARTICLE."
`(lambda (arg)
(gnus-async-article-callback arg ,group ,article ,mark ,summary ,next)))
-(eval-when-compile
- (autoload 'gnus-html-prefetch-images "gnus-html"))
-
(defun gnus-async-article-callback (arg group article mark summary next)
"Function called when an async article is done being fetched."
(save-excursion