2001-02-12 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
[gnus] / lisp / gnus-topic.el
index adfd13a..fd52534 100644 (file)
@@ -421,14 +421,17 @@ 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
-       (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))
+       (setq gnus-killed-list (sort gnus-killed-list 'string<))
+       gnus-level-killed ?K regexp)
+      (when not-in-list
+       (unless gnus-killed-hashtb
+         (gnus-make-hashtable-from-killed))
+       (gnus-group-prepare-flat-list-dead
+        (gnus-delete-if (lambda (group)
+                          (or (gnus-gethash group gnus-newsrc-hashtb)
+                              (gnus-gethash group gnus-killed-hashtb)))
+                        not-in-list)
+        gnus-level-killed ?K regexp)))
 
     ;; Use topics.
     (prog1
@@ -1660,7 +1663,8 @@ If REVERSE, reverse the sorting order."
          (gnus-subscribe-alphabetically newsgroup)
          ;; Add the group to the topic.
          (nconc (assoc topic gnus-topic-alist) (list newsgroup))
-         (throw 'end t))))))
+         (throw 'end t)))
+      nil)))
 
 (provide 'gnus-topic)