Function: gnus-dup-enter-articles

gnus-dup-enter-articles is an autoloaded and byte-compiled function defined in gnus-dup.el.gz.

Signature

(gnus-dup-enter-articles)

Documentation

Enter articles from the current group for future duplicate suppression.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-dup.el.gz
;;;
;;; Interface functions
;;;

(defun gnus-dup-enter-articles ()
  "Enter articles from the current group for future duplicate suppression."
  (unless gnus-dup-hashtb
    (gnus-dup-open))
  (setq gnus-dup-list-dirty t)		; mark list for saving
  (let (msgid)
    ;; Enter the Message-IDs of all read articles into the list
    ;; and hash table.
    (dolist (datum gnus-newsgroup-data)
      (when (and (not (gnus-data-pseudo-p datum))
		 (> (gnus-data-number datum) 0)
		 (not (memq (gnus-data-number datum) gnus-newsgroup-unreads))
		 (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 (gethash msgid gnus-dup-hashtb)))
	(push msgid gnus-dup-list)
	(puthash msgid t gnus-dup-hashtb))))
  ;; Remove excess Message-IDs from the list and hash table.
  (let* ((dups (cons nil gnus-dup-list))
         (end  (nthcdr gnus-duplicate-list-length dups)))
    (when end
      (mapc (lambda (id) (remhash id gnus-dup-hashtb)) (cdr end))
      (setcdr end nil))
    (setq gnus-dup-list (cdr dups))))