Function: gnus-async-prefetch-next

gnus-async-prefetch-next is an autoloaded and byte-compiled function defined in gnus-async.el.gz.

Signature

(gnus-async-prefetch-next GROUP ARTICLE SUMMARY)

Documentation

Possibly prefetch several articles starting with the article after ARTICLE.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-async.el.gz
(defun gnus-async-prefetch-next (group article summary)
  "Possibly prefetch several articles starting with the article after ARTICLE."
  (when (and (gnus-buffer-live-p summary)
	     gnus-asynchronous
	     (gnus-group-asynchronous-p group))
    (with-current-buffer gnus-summary-buffer
      (let ((next (cadr (gnus-data-find-list article))))
	(when next
	  (when gnus-async-timer
	    (ignore-errors
	      (cancel-timer 'gnus-async-timer)))
	  (setq gnus-async-timer
		(run-with-idle-timer
		 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))))))))))