diff options
| author | Richard M. Stallman | 1997-08-23 22:49:09 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-23 22:49:09 +0000 |
| commit | ef3eaa35189ed8a70ef60d404ec483d3b3474c7d (patch) | |
| tree | d89d4b82e862e2b67173c697d6b1bcd6451a87b4 | |
| parent | 0337829499faa8816ede34eed8259b47b6a319bf (diff) | |
| download | emacs-ef3eaa35189ed8a70ef60d404ec483d3b3474c7d.tar.gz emacs-ef3eaa35189ed8a70ef60d404ec483d3b3474c7d.zip | |
(nnvirtual-merge-sorted-lists): Use sort, not merge.
(nnvirtual-partition-sequence): use mapcar, not mapc.
(nnvirtual-create-mapping): Don't use delete-if-not.
| -rw-r--r-- | lisp/gnus/nnvirtual.el | 15 |
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." | |||
| 465 | "Merge many sorted lists of numbers." | 465 | "Merge many sorted lists of numbers." |
| 466 | (if (null (cdr lists)) | 466 | (if (null (cdr lists)) |
| 467 | (car lists) | 467 | (car lists) |
| 468 | (apply 'nnvirtual-merge-sorted-lists | 468 | (sort (apply 'nconc lists) '<))) |
| 469 | (merge 'list (car lists) (cadr lists) '<) | ||
| 470 | (cddr lists)))) | ||
| 471 | |||
| 472 | 469 | ||
| 473 | 470 | ||
| 474 | ;;; We map between virtual articles and real articles in a manner | 471 | ;;; We map between virtual articles and real articles in a manner |
| @@ -626,8 +623,8 @@ the result." | |||
| 626 | (setq entry (assoc (car article) carticles)) | 623 | (setq entry (assoc (car article) carticles)) |
| 627 | (setcdr entry (cons (cdr article) (cdr entry)))) | 624 | (setcdr entry (cons (cdr article) (cdr entry)))) |
| 628 | (setq i (1+ i)))) | 625 | (setq i (1+ i)))) |
| 629 | (mapc (lambda (x) (setcdr x (nreverse (cdr x)))) | 626 | (mapcar (lambda (x) (setcdr x (nreverse (cdr x)))) |
| 630 | carticles) | 627 | carticles) |
| 631 | carticles)) | 628 | carticles)) |
| 632 | 629 | ||
| 633 | 630 | ||
| @@ -732,7 +729,11 @@ based on the marks on the component groups." | |||
| 732 | gnus-article-mark-lists)) | 729 | gnus-article-mark-lists)) |
| 733 | 730 | ||
| 734 | ;; Remove any empty marks lists, and store. | 731 | ;; Remove any empty marks lists, and store. |
| 735 | (setq nnvirtual-mapping-marks (delete-if-not 'cdr marks)) | 732 | (setq nnvirtual-mapping-marks nil) |
| 733 | (while marks | ||
| 734 | (if (cdr (car marks)) | ||
| 735 | (push (car marks) nnvirtual-mapping-marks)) | ||
| 736 | (setq marks (cdr marks))) | ||
| 736 | 737 | ||
| 737 | ;; We need to convert the unreads to reads. We compress the | 738 | ;; We need to convert the unreads to reads. We compress the |
| 738 | ;; sequence as we go, otherwise it could be huge. | 739 | ;; sequence as we go, otherwise it could be huge. |