lisp/ChangeLog addition:
authorDidier Verna <didier@xemacs.org>
Tue, 27 Feb 2007 16:26:59 +0000 (16:26 +0000)
committerDidier Verna <didier@xemacs.org>
Tue, 27 Feb 2007 16:26:59 +0000 (16:26 +0000)
2007-02-27  Didier Verna  <didier@xemacs.org>

Include the group parameters as well as the topic ones in the
inheritance filter process.
* gnus-topic.el (gnus-topic-hierarchical-parameters): New optional
argument GROUP-PARAMS-LIST.
* gnus-topic.el (gnus-group-topic-parameters): Use it.

lisp/ChangeLog
lisp/gnus-topic.el

index 3ebd9da..4f0c9eb 100644 (file)
@@ -1,3 +1,11 @@
+2007-02-27  Didier Verna  <didier@xemacs.org>
+
+       Include the group parameters as well as the topic ones in the
+       inheritance filter process.
+       * gnus-topic.el (gnus-topic-hierarchical-parameters): New optional
+       argument GROUP-PARAMS-LIST.
+       * gnus-topic.el (gnus-group-topic-parameters): Use it.
+
 2007-02-27  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * nntp.el (nntp-never-echoes-commands)
        (rfc2231-parse-string): Allow concatanation of parameters that
        aren't contiguous.  The test case is
          (mail-header-parse-content-type "message/external-body;
-            name*0*=us-ascii''~%2ffoo%2fbar%2fbaz%2fxyzzy%2f;
-            access-type=LOCAL-FILE;
-            name*1*=plugh%2fhello-sailor%2fbing.pdf")
+           name*0*=us-ascii''~%2ffoo%2fbar%2fbaz%2fxyzzy%2f;
+           access-type=LOCAL-FILE;
+           name*1*=plugh%2fhello-sailor%2fbing.pdf")
 
 2006-04-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 
 2004-05-20  Danny Siu  <dsiu@adobe.com>
 
-        * gnus-sum.el (gnus-summary-recenter): Summery buffer was not auto
+       * gnus-sum.el (gnus-summary-recenter): Summery buffer was not auto
        centered even when gnus-auto-center-summary is t
 
 2004-05-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
index c708129..207116e 100644 (file)
@@ -378,31 +378,36 @@ If RECURSIVE is t, return groups in its subtopics too."
      (format "(gnus-topic-set-parameters %S '%S)" topic parameters))))
 
 (defun gnus-group-topic-parameters (group)
-  "Compute the group parameters for GROUP taking into account inheritance from topics."
+  "Compute the group parameters for GROUP in topic mode.
+Possibly inherit parameters from topics above GROUP."
   (let ((params-list (copy-sequence (gnus-group-get-parameter group))))
     (save-excursion
-      (nconc params-list
-            (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."
-  (let ((params-list (nreverse (mapcar 'gnus-topic-parameters
-                                      (gnus-current-topics 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))
+       params-list))))
+
+(defun gnus-topic-hierarchical-parameters (topic &optional group-params-list)
+  "Compute the topic parameters for TOPIC.
+Possibly inherit parameters from topics above TOPIC.
+If optional argument GROUP-PARAMS-LIST is non-nil, use it as the basis for
+inheritance."
+  (let ((params-list
+        ;; We probably have lots of nil elements here, so we remove them.
+        ;; Probably faster than doing this "properly".
+        (delq nil (cons group-params-list
+                        (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))
     ;; Now we have all the parameters, so we go through them
     ;; and do inheritance in the obvious way.
+    (setq params-list (nreverse params-list))
     (while (setq params (pop params-list))
       (while (setq param (pop params))
        (when (atom param)