From: Lars Ingebrigtsen Date: Mon, 7 Feb 2011 16:25:58 +0000 (-0800) Subject: (nnimap-update-info): Simplify split history test. X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=fb8f2a30fdfc3d563268d94b5bc12faa34d2aa76 (nnimap-update-info): Simplify split history test. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6472b0e0..37b0707d7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,6 +7,7 @@ characters. (nnimap-process-quirk): Renamed function to avoid collision. (nnimap-update-info): Fix macrology bug-out. + (nnimap-update-info): Simplify split history test. 2011-02-06 Lars Ingebrigtsen diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 127082bc2..a6fe6b148 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1342,13 +1342,11 @@ textual parts.") ;; Tell Gnus whether there are any \Recent messages in any of ;; the groups. (let ((recent (cdr (assoc '%Recent flags)))) - (when (and active recent) - (while recent - (when (> (car recent) (cdr active)) - (push (list (cons (gnus-group-real-name group) 0)) - nnmail-split-history) - (setq recent nil)) - (pop recent)))) + (when (and active + recent + (> (car (last recent)) (cdr active))) + (push (list (cons (gnus-group-real-name group) 0)) + nnmail-split-history))) ;; Note the active level for the next run-through. (gnus-group-set-parameter info 'active (gnus-active group)) (gnus-group-set-parameter info 'uidvalidity uidvalidity)