Function: gnus-group-first-unread-group
gnus-group-first-unread-group is an autoloaded, interactive and
byte-compiled function defined in gnus-group.el.gz.
Signature
(gnus-group-first-unread-group)
Documentation
Go to the first group with unread articles.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
;; Is there something like an after-point-motion-hook?
;; FIXME: There's `cursor-sensor-mode's `cursor-sensor-functions' property.
;; (inhibit-point-motion-hooks?). Is there a tool-bar-update function?
;; (defun gnus-group-menu-bar-update ()
;; (let* ((buf (list (with-current-buffer gnus-group-buffer
;; (current-buffer))))
;; (name (buffer-name (car buf))))
;; (setcdr buf
;; (if (> (length name) 27)
;; (concat (substring name 0 12)
;; "..."
;; (substring name -12))
;; name))
;; (menu-bar-update-buffers-1 buf)))
;; (defun gnus-group-position-point ()
;; (gnus-goto-colon)
;; (gnus-group-menu-bar-update))
(defun gnus-group-first-unread-group ()
"Go to the first group with unread articles."
(interactive nil gnus-group-mode)
(prog1
(let ((opoint (point))
unread)
(goto-char (point-min))
(if (or (eq (setq unread (gnus-group-group-unread)) t) ; Not active.
(and (numberp unread) ; Not a topic.
(not (zerop unread))) ; Has unread articles.
(zerop (gnus-group-next-unread-group 1))) ; Next unread group.
(point) ; Success.
(goto-char opoint)
nil)) ; Not success.
(gnus-group-position-point)))