+2001-10-31 Simon Josefsson <jas@extundo.com>
+
+ * gnus-cus.el (gnus-group-parameters): Support integer `display'
+ parameter.
+
+ * gnus-sum.el (gnus-select-newsgroup): If group parameter
+ `display' is a number (and C-u wasn't used to enter group), only
+ fetch that number of articles.
+
2001-10-31 Matt Armstrong <matt@lickey.com>
* gnus.el (gnus-find-subscribed-addresses): Doc fix:
(display (choice :tag "Display"
:value default
(const all)
+ (integer)
(const default)
(sexp :tag "Other")) "\
Which articles to display on entering the group.
`all'
Display all articles, both read and unread.
+`integer'
+ Display the last NUMBER articles in the group. This is the same as
+ entering the group with C-u NUMBER.
+
`default'
Display the default visible articles, which normally includes
unread and ticked articles.
'gnus-not-ignore)
((arrayp display)
(gnus-summary-display-make-predicate (mapcar 'identity display)))
+ ((numberp display)
+ ;; The following is probably the "correct" solution, but
+ ;; it makes Gnus fetch all headers and then limit the
+ ;; articles (which is slow), so instead we hack the
+ ;; select-articles parameter instead. -- Simon Josefsson
+ ;; <jas@kth.se>
+ ;;
+ ;; (gnus-byte-compile
+ ;; `(lambda () (> number ,(- (cdr (gnus-active group))
+ ;; display)))))
+ (setq select-articles
+ (gnus-uncompress-range
+ (cons (let ((tmp (- (cdr (gnus-active group)) display)))
+ (if (> tmp 0)
+ tmp
+ 1))
+ (cdr (gnus-active group)))))
+ nil)
(t
nil))))