aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <[email protected]>2010-09-06 00:44:55 +0000
committerKatsumi Yamaoka <[email protected]>2010-09-06 00:44:55 +0000
commita83e5f193336612c2037482d11c72416612620ea (patch)
tree4ad9ae8c2f26e28be05ca694f6eb11663bbbbff4
parent29cd986b8bfa26321f4da05fcb8f245c8cce3fa8 (diff)
gnus-start.el (gnus-get-unread-articles): Don't bother with groups that aren't going to be activated.
-rw-r--r--lisp/gnus/ChangeLog3
-rw-r--r--lisp/gnus/gnus-start.el27
2 files changed, 16 insertions, 14 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 742ffb5ec1..8af66bde01 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,8 @@
2010-09-05 Lars Magne Ingebrigtsen <[email protected]>
+ * 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.
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 56219542db..e7e4dfd928 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -1734,8 +1734,13 @@ If SCAN, request a scan of that group as well."
'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 @@ If SCAN, request a scan of that group as well."
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)