2000-10-30 01:52:40 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Mon, 30 Oct 2000 05:59:50 +0000 (05:59 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Mon, 30 Oct 2000 05:59:50 +0000 (05:59 +0000)
* gnus-util.el (gnus-union): Renamed from gnus-agent-union, and
moved here.
* gnus-agent.el (gnus-agent-fetch-headers): Use it.
* gnus-group.el (gnus-group-prepare-flat): Use it.
* gnus-topic.el (gnus-group-prepare-topics): Use it.

lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-group.el
lisp/gnus-topic.el
lisp/gnus-util.el

index 72f4095..2f82b68 100644 (file)
@@ -1,3 +1,11 @@
+2000-10-30 01:52:40  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-util.el (gnus-union): Renamed from gnus-agent-union, and
+       moved here.
+       * gnus-agent.el (gnus-agent-fetch-headers): Use it.
+       * gnus-group.el (gnus-group-prepare-flat): Use it.
+       * gnus-topic.el (gnus-group-prepare-topics): Use it.
+
 2000-10-30 01:23:49  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mml.el (mml-mode): Show menu in XEmacs.
index bb0ad58..2e97d82 100644 (file)
@@ -933,29 +933,13 @@ the actual number of articles toggled is returned."
        (insert "\n"))
       (pop gnus-agent-group-alist))))
 
-(if (fboundp 'union)
-    (defalias 'gnus-agent-union 'union)
-  (defun gnus-agent-union (l1 l2)
-    "Set union of lists L1 and L2."
-    (cond ((null l1) l2)
-         ((null l2) l1)
-         ((equal l1 l2) l1)
-         (t
-          (or (>= (length l1) (length l2))
-              (setq l1 (prog1 l2 (setq l2 l1))))
-          (while l2
-            (or (memq (car l2) l1)
-                (push (car l2) l1))
-            (pop l2))
-          l1))))
-
 (defun gnus-agent-fetch-headers (group &optional force)
   (let ((articles (gnus-list-of-unread-articles group))
        (gnus-decode-encoded-word-function 'identity)
        (file (gnus-agent-article-name ".overview" group)))
     ;; Add article with marks to list of article headers we want to fetch.
     (dolist (arts (gnus-info-marks (gnus-get-info group)))
-      (setq articles (gnus-agent-union (gnus-uncompress-sequence (cdr arts))
+      (setq articles (gnus-union (gnus-uncompress-sequence (cdr arts))
                            articles)))
     (setq articles (sort articles '<))
     ;; Remove known articles.
index 92af017..dae9dfa 100644 (file)
@@ -1053,8 +1053,7 @@ if it is a string, only list groups matching REGEXP."
        (newsrc (cdr gnus-newsrc-alist))
        (lowest (or lowest 1))
        (not-in-list (and gnus-group-listed-groups
-                      (not (eq gnus-group-list-option 'limit))
-                      (copy-sequence gnus-group-listed-groups)))
+                         (copy-sequence gnus-group-listed-groups)))
        info clevel unread group params)
     (erase-buffer)
     (when (or (< lowest gnus-level-zombie)
@@ -1113,8 +1112,9 @@ if it is a string, only list groups matching REGEXP."
     (if (or gnus-group-listed-groups
            (and (>= level gnus-level-killed) (<= lowest gnus-level-killed)))
        (gnus-group-prepare-flat-list-dead
-        (or not-in-list
-            (setq gnus-killed-list (sort gnus-killed-list 'string<)))
+        (gnus-union 
+         not-in-list
+         (setq gnus-killed-list (sort gnus-killed-list 'string<)))
         gnus-level-killed ?K regexp))
 
     (gnus-group-set-mode-line)
index acf26da..30ac8fa 100644 (file)
@@ -396,7 +396,6 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
         (lowest (or lowest 1))
        (not-in-list 
         (and gnus-group-listed-groups
-             (not (eq gnus-group-list-option 'limit))
              (copy-sequence gnus-group-listed-groups))))
 
     (when (or (not gnus-topic-alist)
@@ -419,11 +418,12 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
               (and (>= level gnus-level-killed) 
                    (<= lowest gnus-level-killed)))
       (gnus-group-prepare-flat-list-dead
-       (if not-in-list 
-          (gnus-delete-if (lambda (group)
-                            (< (gnus-group-level group) gnus-level-killed))
-                          not-in-list)
-        (setq gnus-killed-list (sort gnus-killed-list 'string<)))
+       (gnus-union
+       (and not-in-list 
+            (gnus-delete-if (lambda (group)
+                              (< (gnus-group-level group) gnus-level-killed))
+                            not-in-list))
+       (setq gnus-killed-list (sort gnus-killed-list 'string<)))
        gnus-level-killed ?K
        regexp))
 
index df776a7..47c1302 100644 (file)
@@ -974,6 +974,22 @@ Entries without port tokens default to DEFAULTPORT."
       (while (search-backward "\\." nil t)
        (delete-char 1)))))
 
+(if (fboundp 'union)
+    (defalias 'gnus-union 'union)
+  (defun gnus-union (l1 l2)
+    "Set union of lists L1 and L2."
+    (cond ((null l1) l2)
+         ((null l2) l1)
+         ((equal l1 l2) l1)
+         (t
+          (or (>= (length l1) (length l2))
+              (setq l1 (prog1 l2 (setq l2 l1))))
+          (while l2
+            (or (member (car l2) l1)
+                (push (car l2) l1))
+            (pop l2))
+          l1))))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here