aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-09-06 00:44:55 +0000
committerKatsumi Yamaoka2010-09-06 00:44:55 +0000
commita83e5f193336612c2037482d11c72416612620ea (patch)
tree4ad9ae8c2f26e28be05ca694f6eb11663bbbbff4
parent29cd986b8bfa26321f4da05fcb8f245c8cce3fa8 (diff)
downloademacs-a83e5f193336612c2037482d11c72416612620ea.tar.gz
emacs-a83e5f193336612c2037482d11c72416612620ea.zip
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 742ffb5ec16..8af66bde01a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,8 @@
12010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org> 12010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 2
3 * gnus-start.el (gnus-get-unread-articles): Don't bother with groups
4 that aren't going to be activated.
5
3 * gnus-html.el (gnus-article-html): Allow calling without specifying 6 * gnus-html.el (gnus-article-html): Allow calling without specifying
4 the handle. In that case, dissect the buffer first. 7 the handle. In that case, dissect the buffer first.
5 8
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 56219542dbe..e7e4dfd928e 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."
1734 'foreign))) 1734 'foreign)))
1735 (push (setq method-group-list (list method method-type nil)) 1735 (push (setq method-group-list (list method method-type nil))
1736 type-cache)) 1736 type-cache))
1737 (setcar (nthcdr 2 method-group-list) 1737 ;; Only add groups that need updating.
1738 (cons info (nth 2 method-group-list)))) 1738 (when (<= (gnus-info-level info)
1739 (if (eq method-type 'foreign)
1740 foreign-level
1741 alevel))
1742 (setcar (nthcdr 2 method-group-list)
1743 (cons info (nth 2 method-group-list)))))
1739 1744
1740 ;; Sort the methods based so that the primary and secondary 1745 ;; Sort the methods based so that the primary and secondary
1741 ;; methods come first. This is done for legacy reasons to try to 1746 ;; 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."
1753 infos (nth 2 (car type-cache))) 1758 infos (nth 2 (car type-cache)))
1754 (pop type-cache) 1759 (pop type-cache)
1755 1760
1756 (when method 1761 (when (and method
1762 infos)
1757 ;; See if any of the groups from this method require updating. 1763 ;; See if any of the groups from this method require updating.
1758 (when (block nil 1764 (gnus-read-active-for-groups method infos)
1759 (dolist (info infos) 1765 (dolist (info infos)
1760 (when (<= (gnus-info-level info) 1766 (inline (gnus-get-unread-articles-in-group
1761 (if (eq method-type 'foreign) 1767 info (gnus-active (gnus-info-group info)))))))
1762 foreign-level
1763 alevel))
1764 (return t))))
1765 (gnus-read-active-for-groups method infos)
1766 (dolist (info infos)
1767 (inline (gnus-get-unread-articles-in-group
1768 info (gnus-active (gnus-info-group info))))))))
1769 (gnus-message 6 "Checking new news...done"))) 1768 (gnus-message 6 "Checking new news...done")))
1770 1769
1771(defun gnus-method-rank (type method) 1770(defun gnus-method-rank (type method)