changeset 19496:77c68461cbb0

(nnvirtual-merge-sorted-lists): Use sort, not merge. (nnvirtual-partition-sequence): use mapcar, not mapc. (nnvirtual-create-mapping): Don't use delete-if-not.
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 Aug 1997 22:49:09 +0000
parents 50eec8e7a005
children 29203b66f749
files lisp/gnus/nnvirtual.el
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/nnvirtual.el	Sat Aug 23 22:36:43 1997 +0000
+++ b/lisp/gnus/nnvirtual.el	Sat Aug 23 22:49:09 1997 +0000
@@ -465,10 +465,7 @@
   "Merge many sorted lists of numbers."
   (if (null (cdr lists))
       (car lists)
-    (apply 'nnvirtual-merge-sorted-lists
-	   (merge 'list (car lists) (cadr lists) '<)
-	   (cddr lists))))
-
+    (sort (apply 'nconc lists) '<)))
 
 
 ;;; We map between virtual articles and real articles in a manner
@@ -626,8 +623,8 @@
 	  (setq entry (assoc (car article) carticles))
 	  (setcdr entry (cons (cdr article) (cdr entry))))
 	(setq i (1+ i))))
-    (mapc (lambda (x) (setcdr x (nreverse (cdr x))))
-	  carticles)
+    (mapcar (lambda (x) (setcdr x (nreverse (cdr x))))
+	    carticles)
     carticles))
 
 
@@ -732,7 +729,11 @@
 		 gnus-article-mark-lists))
 
     ;; Remove any empty marks lists, and store.
-    (setq nnvirtual-mapping-marks (delete-if-not 'cdr marks))
+    (setq nnvirtual-mapping-marks nil)
+    (while marks
+      (if (cdr (car marks))
+	  (push (car marks) nnvirtual-mapping-marks))
+      (setq marks (cdr marks)))
 
     ;; We need to convert the unreads to reads.  We compress the
     ;; sequence as we go, otherwise it could be huge.