(set-buffer gnus-article-buffer)
(setq gnus-summary-buffer summary))))))
+(defun gnus-summary-first-article-p (&optional article)
+ "Return whether ARTICLE is the first article in the buffer."
+ (if (not (setq article (or article (gnus-summary-article-number))))
+ nil
+ (eq article (caar gnus-newsgroup-data))))
+
(defun gnus-summary-last-article-p (&optional article)
"Return whether ARTICLE is the last article in the buffer."
(if (not (setq article (or article (gnus-summary-article-number))))
- t ; All non-existent numbers are the last article. :-)
+ t ; All non-existent numbers are the last article. :-)
(not (cdr (gnus-data-find-list article)))))
(defun gnus-make-thread-indent-array ()
(defun gnus-summary-next-unread-article ()
"Select unread article after current one."
(interactive)
- (gnus-summary-next-article t (and gnus-auto-select-same
- (gnus-summary-article-subject))))
+ (gnus-summary-next-article
+ (or (not (eq gnus-summary-goto-unread 'never))
+ (gnus-summary-last-article-p (gnus-summary-article-number)))
+ (and gnus-auto-select-same
+ (gnus-summary-article-subject))))
(defun gnus-summary-prev-article (&optional unread subject)
"Select the article after the current one.
(defun gnus-summary-prev-unread-article ()