- (save-excursion
- (when arg
- (gnus-async-set-buffer)
- (gnus-async-with-semaphore
- (push (list ',(intern (format "%s-%d" group article))
- ,mark (set-marker (make-marker) (point-max))
- ,group ,article)
- gnus-async-article-alist)))
- (if (not (gnus-buffer-live-p ,summary))
- (gnus-async-with-semaphore
- (setq gnus-async-fetch-list nil))
- (gnus-async-prefetch-article ,group ,next ,summary t)))))
+ (gnus-async-article-callback arg ,group ,article ,mark ,summary ,next)))
+
+(defun gnus-async-article-callback (arg group article mark summary next)
+ "Function called when an async article is done being fetched."
+ (save-excursion
+ (setq gnus-async-current-prefetch-article nil)
+ (when arg
+ (gnus-async-set-buffer)
+ (gnus-async-with-semaphore
+ (setq
+ gnus-async-article-alist
+ (cons (list (intern (format "%s-%d" group article)
+ gnus-async-hashtb)
+ mark (set-marker (make-marker) (point-max))
+ group article)
+ gnus-async-article-alist))))
+ (if (not (gnus-buffer-live-p summary))
+ (gnus-async-with-semaphore
+ (setq gnus-async-fetch-list nil))
+ (gnus-async-prefetch-article group next summary t))))