From: yamaoka Date: Thu, 28 Feb 2002 22:42:15 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-01-quimby~28 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f4f46a730b0253d2fee69d018037e24e7b12a11;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c84029c..0948d48 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2002-02-27 ShengHuo ZHU + + * 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 * gnus-sum.el (gnus-articles-to-read): `gnus-large-newsgroup' is diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 9ebc676..0c8ba57 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -4981,22 +4981,24 @@ If SELECT-ARTICLES, only select those articles from GROUP." (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 @@ -11253,13 +11255,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) diff --git a/lisp/gnus.el b/lisp/gnus.el index ce85a84..8a91533 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1679,6 +1679,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