* gnus.el (large-newsgroup-initial): New parameter.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 27 Feb 2002 17:03:59 +0000 (17:03 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 27 Feb 2002 17:03:59 +0000 (17:03 +0000)
* gnus-sum.el (gnus-articles-to-read): Use large-newsgroup-initial.
(gnus-summary-insert-old-articles): Ditto.

lisp/ChangeLog
lisp/gnus-sum.el
lisp/gnus.el

index c84029c..0948d48 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-27  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus.el (large-newsgroup-initial): New parameter.
+
+       * gnus-sum.el (gnus-articles-to-read): Use large-newsgroup-initial.
+       (gnus-summary-insert-old-articles): Ditto.
+
 2002-02-26  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-sum.el (gnus-articles-to-read): `gnus-large-newsgroup' is
index a85451b..19c1694 100644 (file)
@@ -4961,16 +4961,20 @@ If SELECT-ARTICLES, only select those articles from GROUP."
                       (numberp gnus-large-newsgroup)
                       (> number gnus-large-newsgroup))
                  (let* ((cursor-in-echo-area nil)
+                        (initial (gnus-parameter-large-newsgroup-initial 
+                                  gnus-newsgroup-name))
                         (input
                          (read-string
                           (format
-                           "How many articles from %s (max %d): "
+                           "How many articles from %s (%s %d): "
                            (gnus-limit-string
                             (gnus-group-decoded-name gnus-newsgroup-name)
                             35)
+                           (if initial "max" "default")
                            number)
-                          (cons (number-to-string gnus-large-newsgroup)
-                                0))))
+                          (if initial
+                              (cons (number-to-string initial)
+                                    0)))))
                    (if (string-match "^[ \t]*$" input) number input)))
                 ((and (> scored marked) (< scored number)
                       (> (- scored number) 20))
@@ -10948,13 +10952,20 @@ If ALL is a number, fetch this number of articles."
         (t
          (if (and (numberp gnus-large-newsgroup)
                   (> len gnus-large-newsgroup))
-             (let ((input
-                    (read-string
-                     (format
-                      "How many articles from %s (default %d): "
-                      (gnus-limit-string
-                       (gnus-group-decoded-name gnus-newsgroup-name) 35)
-                      len))))
+             (let* ((cursor-in-echo-area nil)
+                    (initial (gnus-parameter-large-newsgroup-initial 
+                              gnus-newsgroup-name))
+                    (input
+                     (read-string
+                      (format
+                       "How many articles from %s (%s %d): "
+                       (gnus-limit-string
+                        (gnus-group-decoded-name gnus-newsgroup-name) 35)
+                       (if initial "max" "default")
+                       len)
+                      (if initial
+                          (cons (number-to-string initial)
+                                0)))))
                (unless (string-match "^[ \t]*$" input)
                  (setq all (string-to-number input))
                  (if (< all len)
index 9dfad4e..a577756 100644 (file)
@@ -1641,6 +1641,23 @@ posting an article."
  :parameter-document
  "Posting method for this group.")
 
+(gnus-define-group-parameter
+ large-newsgroup-initial
+ :type integer
+ :function-document
+ "Return GROUP's initial input of the number of articles."
+ :variable-document
+ "*Alist of group regexps and its initial input of the number of articles."
+ :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
+                         (const :tag "All" nil)
+                         (integer))
+ :parameter-document "\
+
+This number will be prompted as the initial value of the number of
+articles to list when the group is a large newsgroup (see
+`gnus-large-newsgroup').  If it is `nil', the default value is the
+total number of articles in the group.")
+
 (defcustom gnus-group-uncollapsed-levels 1
   "Number of group name elements to leave alone when making a short group name."
   :group 'gnus-group-visual