* nnimap.el (nnimap-update-info): Refactor slightly.
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2011 10:04:12 +0000 (02:04 -0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2011 10:04:12 +0000 (02:04 -0800)
lisp/ChangeLog
lisp/nnimap.el

index 6f5bfeb..8ba2338 100644 (file)
@@ -1,3 +1,7 @@
+2011-02-07  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * nnimap.el (nnimap-update-info): Refactor slightly.
+
 2011-02-06  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * nntp.el (nntp-finish-retrieve-group-infos): Protect against the first
index b50d656..b1bbf4e 100644 (file)
@@ -1226,33 +1226,33 @@ textual parts.")
             (completep (and start-article
                             (= start-article 1)))
             (active (or (gnus-active group)
-                        (cdr (assq 'active (gnus-info-params info))))))
+                        (cdr (assq 'active (gnus-info-params info)))))
+            new-active)
        (when uidnext
          (setq high (1- uidnext)))
        ;; First set the active ranges based on high/low.
-       (if (or completep
-               (not (gnus-active group)))
-           (gnus-set-active group
-                            (cond
-                             (active
-                              (cons (min (or low (car active))
-                                         (car active))
-                                    (max (or high (cdr active))
-                                         (cdr active))))
-                             ((and low high)
-                              (cons low high))
-                             (uidnext
-                              ;; No articles in this group.
-                              (cons uidnext (1- uidnext)))
-                             (start-article
-                              (cons start-article (1- start-article)))
-                             (t
-                              ;; No articles and no uidnext.
-                              nil)))
-         (gnus-set-active
-          group
-          (cons (car active)
-                (or high (1- uidnext)))))
+       (setq new-active
+             (if (or completep
+                     (not (gnus-active group)))
+                 (cond
+                  (active
+                   (cons (min (or low (car active))
+                              (car active))
+                         (max (or high (cdr active))
+                              (cdr active))))
+                  ((and low high)
+                   (cons low high))
+                  (uidnext
+                   ;; No articles in this group.
+                   (cons uidnext (1- uidnext)))
+                  (start-article
+                   (cons start-article (1- start-article)))
+                  (t
+                   ;; No articles and no uidnext.
+                   nil))
+               (cons (car active)
+                     (or high (1- uidnext)))))
+       (gnus-set-active group new-active)
        ;; See whether this is a read-only group.
        (unless (eq permanent-flags 'not-scanned)
          (gnus-group-set-parameter