Function: rmail-first-unseen-message

rmail-first-unseen-message is a byte-compiled function defined in rmail.el.gz.

Signature

(rmail-first-unseen-message)

Documentation

Return message number of first message which has unseen attribute.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
;; Scan for attributes, and compare subjects.

(defun rmail-first-unseen-message ()
  "Return message number of first message which has `unseen' attribute."
  (rmail-maybe-set-message-counters)
  (let ((current 1)
	found)
    (save-restriction
      (widen)
      (while (and (not found) (<= current rmail-total-messages))
	(if (rmail-message-attr-p current "......U")
	    (setq found current))
	(setq current (1+ current))))
    found))