- (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)))))))