* gnus-topic.el (gnus-group-topic-parameters): Work when group
authorSimon Josefsson <jas@extundo.com>
Mon, 6 May 2002 16:52:06 +0000 (16:52 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 6 May 2002 16:52:06 +0000 (16:52 +0000)
buffer doesn't show group.  From Matt Armstrong <matt@lickey.com>.

lisp/ChangeLog
lisp/gnus-topic.el

index 5d5cd6d..d87788f 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-06  Simon Josefsson  <jas@extundo.com>
+
+       * gnus-topic.el (gnus-group-topic-parameters): Work when group
+       buffer doesn't show group.  From Matt Armstrong <matt@lickey.com>.
+
 2002-05-06  Josh Huber  <huber@alum.wpi.edu>
 
        * mml2015.el (mml2015-gpg-encrypt): Changed name of optional
index b4a4042..65618a9 100644 (file)
@@ -380,9 +380,17 @@ If RECURSIVE is t, return groups in its subtopics too."
   "Compute the group parameters for GROUP taking into account inheritance from topics."
   (let ((params-list (copy-sequence (gnus-group-get-parameter group))))
     (save-excursion
-      (gnus-group-goto-group group)
       (nconc params-list
-            (gnus-topic-hierarchical-parameters (gnus-current-topic))))))
+            (gnus-topic-hierarchical-parameters
+             ;; First we try to go to the group within the group
+             ;; buffer and find the topic for the group that way.
+             ;; This hopefully copes well with groups that are in
+             ;; more than one topic.  Failing that (i.e. when the
+             ;; group isn't visible in the group buffer) we find a
+             ;; topic for the group via gnus-group-topic.
+             (or (and (gnus-group-goto-group group)
+                      (gnus-current-topic))
+                 (gnus-group-topic group)))))))
 
 (defun gnus-topic-hierarchical-parameters (topic)
   "Return a topic list computed for TOPIC."