- (while data
- (when (gnus-data-read-p (car data))
- (intern (car (push (mail-header-id (gnus-data-header (car data)))
- gnus-dup-list))
- gnus-dup-hashtb))
- (pop data))
- ;; Chop off excess Message-IDs from the list.
- (let ((end (nthcdr gnus-duplicate-list-length gnus-dup-list)))
- (when end
- (setcdr end nil)))))
+ (while (setq datum (pop data))
+ (when (and (not (gnus-data-pseudo-p datum))
+ (> (gnus-data-number datum) 0)
+ (gnus-data-read-p datum)
+ (not (= (gnus-data-mark datum) gnus-canceled-mark))
+ (setq msgid (mail-header-id (gnus-data-header datum)))
+ (not (nnheader-fake-message-id-p msgid))
+ (not (intern-soft msgid gnus-dup-hashtb)))
+ (push msgid gnus-dup-list)
+ (intern msgid gnus-dup-hashtb))))
+ ;; Chop off excess Message-IDs from the list.
+ (let ((end (nthcdr gnus-duplicate-list-length gnus-dup-list)))
+ (when end
+ (setcdr end nil))))