Function: gnus-group-mark-article-read

gnus-group-mark-article-read is a byte-compiled function defined in gnus-group.el.gz.

Signature

(gnus-group-mark-article-read GROUP ARTICLE)

Documentation

Mark ARTICLE read.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
(defun gnus-group-mark-article-read (group article)
  "Mark ARTICLE read."
  (let ((buffer (gnus-summary-buffer-name group))
	(mark gnus-read-mark)
	active n)
    (if (get-buffer buffer)
	(with-current-buffer buffer
	  (setq active gnus-newsgroup-active)
	  (gnus-activate-group group)
	  (when gnus-newsgroup-prepared
	    (when (and gnus-newsgroup-auto-expire
		       (memq mark gnus-auto-expirable-marks))
	      (setq mark gnus-expirable-mark))
	    (setq mark (gnus-request-update-mark
			group article mark))
	    (gnus-request-set-mark
	     group (list (list (list article) 'add '(read))))
	    (gnus-mark-article-as-read article mark)
	    (setq gnus-newsgroup-active (gnus-active group))
	    (when active
	      (setq n (1+ (cdr active)))
	      (while (<= n (cdr gnus-newsgroup-active))
		(unless (eq n article)
		  (push n gnus-newsgroup-unselected))
		(setq n (1+ n)))
	      (setq gnus-newsgroup-unselected
		    (sort gnus-newsgroup-unselected #'<)))))
      (gnus-activate-group group)
      (gnus-group-make-articles-read group (list article))
      (when (and (gnus-group-auto-expirable-p group)
		 (not (gnus-group-read-only-p group)))
	(gnus-add-marked-articles
	 group 'expire (list article))))))