emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101373: gnus-start.el (gnus-get-unre


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101373: gnus-start.el (gnus-get-unread-articles): Don't bother with groups that aren't going to be activated.
Date: Mon, 06 Sep 2010 00:44:55 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101373
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2010-09-06 00:44:55 +0000
message:
  gnus-start.el (gnus-get-unread-articles): Don't bother with groups that 
aren't going to be activated.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-start.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-09-06 00:41:06 +0000
+++ b/lisp/gnus/ChangeLog       2010-09-06 00:44:55 +0000
@@ -1,5 +1,8 @@
 2010-09-05  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * gnus-start.el (gnus-get-unread-articles): Don't bother with groups
+       that aren't going to be activated.
+
        * gnus-html.el (gnus-article-html): Allow calling without specifying
        the handle.  In that case, dissect the buffer first.
 

=== modified file 'lisp/gnus/gnus-start.el'
--- a/lisp/gnus/gnus-start.el   2010-09-06 00:20:42 +0000
+++ b/lisp/gnus/gnus-start.el   2010-09-06 00:44:55 +0000
@@ -1734,8 +1734,13 @@
                'foreign)))
        (push (setq method-group-list (list method method-type nil))
              type-cache))
-      (setcar (nthcdr 2 method-group-list)
-             (cons info (nth 2 method-group-list))))
+      ;; Only add groups that need updating.
+      (when (<= (gnus-info-level info)
+               (if (eq method-type 'foreign)
+                   foreign-level
+                 alevel))
+       (setcar (nthcdr 2 method-group-list)
+               (cons info (nth 2 method-group-list)))))
 
     ;; Sort the methods based so that the primary and secondary
     ;; methods come first.  This is done for legacy reasons to try to
@@ -1753,19 +1758,13 @@
            infos (nth 2 (car type-cache)))
       (pop type-cache)
 
-      (when method
+      (when (and method
+                infos)
        ;; See if any of the groups from this method require updating.
-       (when (block nil
-               (dolist (info infos)
-                 (when (<= (gnus-info-level info)
-                           (if (eq method-type 'foreign)
-                               foreign-level
-                             alevel))
-                   (return t))))
-         (gnus-read-active-for-groups method infos)
-         (dolist (info infos)
-           (inline (gnus-get-unread-articles-in-group
-                    info (gnus-active (gnus-info-group info))))))))
+       (gnus-read-active-for-groups method infos)
+       (dolist (info infos)
+         (inline (gnus-get-unread-articles-in-group
+                  info (gnus-active (gnus-info-group info)))))))
     (gnus-message 6 "Checking new news...done")))
 
 (defun gnus-method-rank (type method)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]