+2000-12-30 09:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * nnheader.el (autoload): Autoload gnus-sorted-intersection.
+
+ * nnml.el (autoload): Move to nnheader.el.
+
+ * nnfolder.el (nnfolder-existing-articles): Reversed.
+ (nnfolder-request-expire-articles): Use gnus-sorted-intersection.
+ (nnfolder-retrieve-headers): Use intersection.
+
2000-12-30 00:17:38 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-art.el (article-make-date-line): Get the hours right.
(require 'gnus-util)
(require 'gnus-range)
+(eval-and-compile
+ (autoload 'gnus-intersection "gnus-range"))
+
(nnoo-declare nnfolder)
(defvoo nnfolder-directory (expand-file-name message-directory)
'headers
(if (nnfolder-retrieve-headers-with-nov articles fetch-old)
'nov
+ (setq articles (gnus-sorted-intersection
+ ;; Is ARTICLES sorted?
+ (sort articles)
+ (nnfolder-existing-articles)))
(while (setq article (pop articles))
(set-buffer nnfolder-current-buffer)
(when (nnfolder-goto-article article)
(let ((marker (concat "\n" nnfolder-article-marker))
(number "[0-9]+")
numbers)
-
(while (and (search-forward marker nil t)
(re-search-forward number nil t))
(let ((newnum (string-to-number (match-string 0))))
(if (nnmail-within-headers-p)
(push newnum numbers))))
- numbers))))
+ ;; The article numbers are increasing, so this result is sorted.
+ (nreverse numbers)))))
(deffoo nnfolder-request-expire-articles
(articles newsgroup &optional server force)
;; The articles that really exist and will
;; be expired if they are old enough.
(maybe-expirable
- (gnus-intersection articles (nnfolder-existing-articles))))
+ (gnus-sorted-intersection articles (nnfolder-existing-articles))))
(nnmail-activate 'nnfolder)
(save-excursion