From: Lars Ingebrigtsen Date: Mon, 7 Feb 2011 22:49:38 +0000 (+0000) Subject: nnimap.el (nnimap-update-info): Simplify split history test. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~969 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b52daf3d93096c3d1c40ac04568fa4f9540253f1;p=emacs.git nnimap.el (nnimap-update-info): Simplify split history test. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a18f145cb68..412492c29dc 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/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/gnus/nnimap.el b/lisp/gnus/nnimap.el index 127082bc28f..a6fe6b1489b 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/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)