Function: gnus-mark-xrefs-as-read

gnus-mark-xrefs-as-read is a byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-mark-xrefs-as-read FROM-NEWSGROUP HEADERS UNREADS)

Documentation

Look through all the headers and mark the Xrefs as read.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-mark-xrefs-as-read (from-newsgroup headers unreads)
  "Look through all the headers and mark the Xrefs as read."
  (let ((virtual (gnus-virtual-group-p from-newsgroup))
	info xref-hashtb method nth4)
    (with-current-buffer gnus-group-buffer
      (when (setq xref-hashtb
		  (gnus-create-xref-hashtb from-newsgroup headers unreads))
	(maphash
	 (lambda (group idlist)
	   (unless (string= from-newsgroup group)
	     ;; Dead groups are not updated.
	     (and (prog1
		      (setq info (gnus-get-info group))
		    (when (stringp (setq nth4 (gnus-info-method info)))
		      (setq nth4 (gnus-server-to-method nth4))))
		  ;; Only do the xrefs if the group has the same
		  ;; select method as the group we have just read.
		  (or (gnus-methods-equal-p
		       nth4 (gnus-find-method-for-group from-newsgroup))
		      virtual
		      (equal nth4 (setq method (gnus-find-method-for-group
						from-newsgroup)))
		      (and (equal (car nth4) (car method))
			   (equal (nth 1 nth4) (nth 1 method))))
		  gnus-use-cross-reference
		  (or (not (eq gnus-use-cross-reference t))
		      virtual
		      ;; Only do cross-references on subscribed
		      ;; groups, if that is what is wanted.
		      (<= (gnus-info-level info) gnus-level-subscribed))
		  (gnus-group-make-articles-read group idlist))))
	 xref-hashtb)))))