2001-12-13 Josh Huber <huber@alum.wpi.edu>
authorJosh Huber <huber@alum.wpi.edu>
Fri, 14 Dec 2001 04:04:13 +0000 (04:04 +0000)
committerJosh Huber <huber@alum.wpi.edu>
Fri, 14 Dec 2001 04:04:13 +0000 (04:04 +0000)
      * gnus-cus.el (gnus-extra-topic-parameters): added topic parameter
      subscribe-level
      * gnus-topic.el (gnus-subscribe-topics): use it.

lisp/ChangeLog
lisp/gnus-cus.el
lisp/gnus-topic.el
texi/gnus.texi

index 72e7c4d..a6731e1 100644 (file)
@@ -1,3 +1,9 @@
+2001-12-13  Josh Huber  <huber@alum.wpi.edu>
+
+       * gnus-cus.el (gnus-extra-topic-parameters): added topic parameter
+       subscribe-level
+       * gnus-topic.el (gnus-subscribe-topics): use it.
+
 2001-12-13 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-msg.el (gnus-summary-mail-forward): Forward all marked
index f58e369..6df3ffa 100644 (file)
@@ -242,7 +242,12 @@ DOC is a documentation string for the parameter.")
 If `gnus-subscribe-newsgroup-method' or
 `gnus-subscribe-options-newsgroup-method' is set to
 `gnus-subscribe-topics', new groups that matches this regexp will
-automatically be subscribed to this topic"))
+automatically be subscribed to this topic")
+    (subscribe-level (integer :tag "Subscribe Level" :value 1) "\
+If this topic parameter is set, when new groups are subscribed
+automatically under this topic (via the `subscribe' topic parameter)
+assign this level to the group, rather than the default level
+set in `gnus-level-default-subscribed'"))
   "Alist of topic parameters that are not also group parameters.
 
 Each entry has the form (NAME TYPE DOC), where NAME is the parameter
index ead95c3..064bcb0 100644 (file)
@@ -1690,6 +1690,12 @@ If REVERSE, reverse the sorting order."
          (gnus-subscribe-alphabetically newsgroup)
          ;; Add the group to the topic.
          (nconc (assoc topic gnus-topic-alist) (list newsgroup))
+         ;; if this topic specifies a default level, use it
+         (let ((subscribe-level (cdr (assq 'subscribe-level
+                                           (gnus-topic-parameters topic)))))
+           (when subscribe-level
+               (gnus-group-change-level newsgroup subscribe-level
+                                        gnus-level-default-subscribed)))
          (throw 'end t)))
       nil)))
 
index c9aa463..0320860 100644 (file)
@@ -3776,6 +3776,11 @@ When subscribing new groups by topic (@pxref{Subscription Methods}), the
 value should be a regexp to match the groups that should go in that
 topic.
 
+@item subscribe-level
+When subscribing new groups by topic (see the @code{subscribe} parameter),
+the group will be subscribed with the level specified in the 
+@code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
+
 @end table
 
 Group parameters (of course) override topic parameters, and topic