+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
(condition-case ()
(cond
((and (or (<= scored marked) (= scored number))
- (natnump gnus-large-newsgroup)
+ (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-from-minibuffer
+ (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 (string-match "^[ \t]*$" input)
- number
- input)))
+ (if initial
+ (cons (number-to-string initial)
+ 0)))))
+ (if (string-match "^[ \t]*$" input) number input)))
((and (> scored marked) (< scored number)
(> (- scored number) 20))
(let ((input
(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)
: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