Only run -request-scan once per method on `g'.
[gnus] / lisp / gnus-start.el
index 5f14209..851e96b 100644 (file)
@@ -1701,10 +1701,12 @@ If SCAN, request a scan of that group as well."
          (setq method gnus-select-method)
        ;; There may be several similar methods.  Possibly extend the
        ;; method.
-       (setq method (gnus-find-method-for-group (gnus-info-group info) info))
        (if (setq cmethod (assoc method methods-cache))
            (setq method (cdr cmethod))
-         (setq cmethod (inline (gnus-server-get-method nil method)))
+         (setq cmethod (if (stringp method)
+                           (gnus-server-to-method method)
+                         (inline (gnus-find-method-for-group
+                                  (gnus-info-group info) info))))
          (push (cons method cmethod) methods-cache)
          (setq method cmethod)))
       (setq method-group-list (assoc method type-cache))
@@ -1755,8 +1757,7 @@ If SCAN, request a scan of that group as well."
          (when (gnus-check-backend-function
                 'retrieve-group-data-early (car method))
            (when (gnus-check-backend-function 'request-scan (car method))
-             (dolist (info infos)
-               (gnus-request-scan (gnus-info-group info) method)))
+             (gnus-request-scan nil method))
            (setcar (nthcdr 3 elem)
                    (gnus-retrieve-group-data-early method infos))))))
 
@@ -1804,8 +1805,7 @@ If SCAN, request a scan of that group as well."
       (gnus-agent-save-active method))
      ((gnus-check-backend-function 'retrieve-groups (car method))
       (when (gnus-check-backend-function 'request-scan (car method))
-       (dolist (info infos)
-         (gnus-request-scan (gnus-info-group info) method)))
+       (gnus-request-scan nil method))
       (let (groups)
        (gnus-read-active-file-2
         (dolist (info infos (nreverse groups))
@@ -2053,10 +2053,7 @@ If SCAN, request a scan of that group as well."
                          (gnus-online method))
                     (not gnus-agent))
                 (gnus-check-backend-function 'request-scan (car method)))
-       (if infos
-           (dolist (info infos)
-             (gnus-request-scan (gnus-info-group info) method))
-         (gnus-request-scan nil method)))
+       (gnus-request-scan nil method))
       (cond
        ((and (eq gnus-read-active-file 'some)
             (gnus-check-backend-function 'retrieve-groups (car method))