summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-23 22:49:09 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-23 22:49:09 +0000
commitc103e1e2cacc129fe6ece08781dea9ffcab633cd (patch)
treed2a04eebfd32f60557ddcb6b8ff0dc168bbedf67 /lisp
parent735a578ce96d3a782fc40d31c999e41e14f1e25a (diff)
downloademacs-c103e1e2cacc129fe6ece08781dea9ffcab633cd.tar.gz
(nnvirtual-merge-sorted-lists): Use sort, not merge.
(nnvirtual-partition-sequence): use mapcar, not mapc. (nnvirtual-create-mapping): Don't use delete-if-not.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/nnvirtual.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el
index 50fb7b07dca..05db7591112 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -465,10 +465,7 @@ If UPDATE-P is not nil, call gnus-group-update-group on the components."
"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 @@ the result."
(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 @@ based on the marks on the component groups."
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.