From 5f61f48a53b559a709b121921cafa66918ed1649 Mon Sep 17 00:00:00 2001 From: Kevin Greiner Date: Thu, 23 Jan 2003 17:45:20 +0000 Subject: [PATCH] * gnus-sum.el (gnus-summary-first-subject): Fixed bug that I introduced on 2002-01-22. (gnus-summary-first-unseen-or-unread-subject): Ditto. --- lisp/ChangeLog | 6 ++++++ lisp/gnus-sum.el | 49 +++++++++++++++--------------------------------- 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 747beb717..247913e72 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-01-23 Kevin Greiner + + * gnus-sum.el (gnus-summary-first-subject): Fixed bug that I + introduced on 2002-01-22. + (gnus-summary-first-unseen-or-unread-subject): Ditto. + 2003-01-23 Teodor Zlatanov * spam.el (spam-check-regex-headers, spam-list-of-checks) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 10e2bb9a7..fbd3a65d6 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2683,7 +2683,7 @@ The following commands are available: `(assq ,number gnus-newsgroup-data)) (defmacro gnus-data-find-list (number &optional data) - `(let ((bdata ,(or data 'gnus-newsgroup-data))) + `(let* ((bdata ,(or data 'gnus-newsgroup-data))) (memq (assq ,number bdata) bdata))) @@ -6717,36 +6717,16 @@ Returns the article selected or nil if there are no matching articles." (gnus-data-number (car gnus-newsgroup-data))) ;; Find the first unread article. (t - (let ((data gnus-newsgroup-data) - (gnus-newsgroup-unreads gnus-newsgroup-unreads) - (gnus-newsgroup-undownloaded gnus-newsgroup-undownloaded) - (gnus-newsgroup-unseen gnus-newsgroup-unseen) - (gnus-newsgroup-unfetched gnus-newsgroup-unfetched)) + (let ((data gnus-newsgroup-data)) (while (and data - (not (let ((num (gnus-data-number (car data))) - (matched nil)) - (while (> num (or (car gnus-newsgroup-unfetched) - (1+ num))) - (pop gnus-newsgroup-unfetched)) - (unless (eq num (car gnus-newsgroup-unfetched)) - (when unread - (while (> num (or (car gnus-newsgroup-unreads) - (1+ num))) - (pop gnus-newsgroup-unreads)) - (setq matched (eq num (car gnus-newsgroup-unreads)))) - (unless matched - (when undownloaded - (while (> num (or (car gnus-newsgroup-undownloaded) - (1+ num))) - (pop gnus-newsgroup-undownloaded)) - (setq matched (eq num (car gnus-newsgroup-undownloaded)))) - (unless matched - (when unseen - (while (> num (or (car gnus-newsgroup-unseen) - (1+ num))) - (pop gnus-newsgroup-unseen)) - (setq matched (eq num (car gnus-newsgroup-unseen))))))) - matched))) + (let ((num (gnus-data-number (car data)))) + (or (memq num gnus-newsgroup-unfetched) + (not (or (and unread + (memq num gnus-newsgroup-unreads)) + (and undownloaded + (memq num gnus-newsgroup-undownloaded)) + (and unseen + (memq num gnus-newsgroup-unseen))))))) (setq data (cdr data))) (prog1 (if data @@ -7229,13 +7209,14 @@ Return nil if there are no unseen articles." (gnus-summary-position-point))) (defun gnus-summary-first-unseen-or-unread-subject () - "Place the point on the subject line of the first unseen article. -Return nil if there are no unseen articles." + "Place the point on the subject line of the first unseen article or, +if all article have been seen, on the subject line of the first unread +article." (interactive) (prog1 - (unless (when (gnus-summary-first-subject t nil t) + (unless (when (gnus-summary-first-subject nil nil t) (gnus-summary-show-thread) - (gnus-summary-first-subject t nil t)) + (gnus-summary-first-subject nil nil t)) (when (gnus-summary-first-subject t) (gnus-summary-show-thread) (gnus-summary-first-subject t))) -- 2.25.1