From b6f511b7ddbde52b82ad34a450251ce008212cce Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Fri, 10 Sep 2010 05:30:35 +0000 Subject: [PATCH] gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups. --- lisp/ChangeLog | 8 ++++++++ lisp/gnus-start.el | 22 +++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37d8c05ed..7cca5695a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-09-10 Katsumi Yamaoka + + * gnus-start.el (gnus-read-active-for-groups): Check only subscribed + groups; replace mapcar with dolist which is a bit faster; pass groups + info to gnus-read-active-file-1. + (gnus-read-active-file-1): Scan only specified groups if the new + optional arg `infos' is given. + 2010-09-09 Lars Magne Ingebrigtsen * mail-source.el (mail-source-fetch-pop): Use pop3-movemail again. diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 891777d86..b2b47afe2 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1801,14 +1801,15 @@ If SCAN, request a scan of that group as well." (cond ((gnus-check-backend-function 'retrieve-groups (car method)) (when (gnus-check-backend-function 'request-scan (car method)) - (gnus-request-scan nil method)) - (gnus-read-active-file-2 - (mapcar (lambda (info) - (gnus-group-real-name (gnus-info-group info))) - infos) - method)) + (dolist (info infos) + (gnus-request-scan (gnus-info-group info) method))) + (let (groups) + (gnus-read-active-file-2 + (dolist (info infos (nreverse groups)) + (push (gnus-group-real-name (gnus-info-group info)) groups)) + method))) ((gnus-check-backend-function 'request-list (car method)) - (gnus-read-active-file-1 method nil)) + (gnus-read-active-file-1 method nil infos)) (t (dolist (info infos) (gnus-activate-group (gnus-info-group info) nil nil method t)))))) @@ -2037,7 +2038,7 @@ If SCAN, request a scan of that group as well." (message "Quit reading the active file") nil)))))))) -(defun gnus-read-active-file-1 (method force) +(defun gnus-read-active-file-1 (method force &optional infos) (let (where mesg) (setq where (nth 1 method) mesg (format "Reading active file%s via %s..." @@ -2050,7 +2051,10 @@ If SCAN, request a scan of that group as well." (when (and gnus-agent (gnus-online method) (gnus-check-backend-function 'request-scan (car method))) - (gnus-request-scan nil method)) + (if infos + (dolist (info infos) + (gnus-request-scan (gnus-info-group info) method)) + (gnus-request-scan nil method))) (cond ((and (eq gnus-read-active-file 'some) (gnus-check-backend-function 'retrieve-groups (car method)) -- 2.34.1