Import No Gnus v0.3.
[elisp/gnus.git-] / lisp / gnus-topic.el
index f485f5d..ff7e59a 100644 (file)
@@ -166,9 +166,11 @@ See Info node `(gnus)Formatting Variables'."
    (list (completing-read "Go to topic: "
                          (mapcar 'list (gnus-topic-list))
                          nil t)))
-  (dolist (topic (gnus-current-topics topic))
-    (gnus-topic-goto-topic topic)
-    (gnus-topic-fold t))
+  (let ((buffer-read-only nil))
+    (dolist (topic (gnus-current-topics topic))
+      (unless (gnus-topic-goto-topic topic)
+       (gnus-topic-goto-missing-topic topic)
+       (gnus-topic-display-missing-topic topic))))
   (gnus-topic-goto-topic topic))
 
 (defun gnus-current-topic ()
@@ -392,10 +394,9 @@ If RECURSIVE is t, return groups in its subtopics too."
 
 (defun gnus-topic-hierarchical-parameters (topic)
   "Return a topic list computed for TOPIC."
-  (let ((topics (gnus-current-topics topic))
-       params-list param out params)
-    (while topics
-      (push (gnus-topic-parameters (pop topics)) params-list))
+  (let ((params-list (nreverse (mapcar 'gnus-topic-parameters
+                                      (gnus-current-topics topic))))
+       param out params)
     ;; We probably have lots of nil elements here, so
     ;; we remove them.  Probably faster than doing this "properly".
     (setq params-list (delq nil params-list))
@@ -1729,9 +1730,7 @@ If REVERSE, reverse the sorting order."
     (if (gnus-topic-find-topology to current-top 0);; Don't care the level
        (error "Can't move `%s' to its sub-level" current))
     (gnus-topic-find-topology current nil nil 'delete)
-    (while (cdr to-top)
-      (setq to-top (cdr to-top)))
-    (setcdr to-top (list current-top))
+    (setcdr (last to-top) (list current-top))
     (gnus-topic-enter-dribble)
     (gnus-group-list-groups)
     (gnus-topic-goto-topic current)))
@@ -1758,4 +1757,5 @@ If REVERSE, reverse the sorting order."
 
 (provide 'gnus-topic)
 
+;;; arch-tag: bf176856-f30c-40f0-ae77-e41529a1134c
 ;;; gnus-topic.el ends here