(nnimap-parse-flags): Parse the data in any order.
[gnus] / lisp / gnus-start.el
index 2f2e2a4..77ce8ee 100644 (file)
@@ -268,7 +268,7 @@ not match this regexp will be removed before saving the list."
   (mapconcat 'identity
             '("^to\\."                 ; not "real" groups
               "^[0-9. \t]+\\( \\|$\\)" ; all digits in name
-              "^[\"][]\"[#'()]"        ; bogus characters
+              "^[\"][\"#'()]"  ; bogus characters
               )
             "\\|")
   "*A regexp to match uninteresting newsgroups in the active file.
@@ -705,6 +705,7 @@ the first newsgroup."
        nnoo-state-alist nil
        gnus-current-select-method nil
        nnmail-split-history nil
+       gnus-extended-servers nil
        gnus-ephemeral-servers nil)
   (gnus-shutdown 'gnus)
   ;; Kill the startup file.
@@ -1693,28 +1694,19 @@ If SCAN, request a scan of that group as well."
     (while newsrc
       (setq active (gnus-active (setq group (gnus-info-group
                                             (setq info (pop newsrc))))))
-
-      ;; Check newsgroups.  If the user doesn't want to check them, or
-      ;; they can't be checked (for instance, if the news server can't
-      ;; be reached) we just set the number of unread articles in this
-      ;; newsgroup to t.  This means that Gnus thinks that there are
-      ;; unread articles, but it has no idea how many.
-
-      ;; To be more explicit:
-      ;; >0 for an active group with messages
-      ;; 0 for an active group with no unread messages
-      ;; nil for non-foreign groups that the user has requested not be checked
-      ;; t for unchecked foreign groups or bogus groups, or groups that can't
-      ;;   be checked, for one reason or other.
-
       ;; First go through all the groups, see what select methods they
       ;; belong to, and then collect them into lists per unique select
       ;; method.
       (if (not (setq method (gnus-info-method info)))
          (setq method gnus-select-method)
+       ;; There may be several similar methods.  Possibly extend the
+       ;; method.
        (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))
@@ -1765,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))))))
 
@@ -1778,8 +1769,7 @@ If SCAN, request a scan of that group as well."
          (gnus-read-active-for-groups method infos early-data)
          (dolist (info infos)
            (inline (gnus-get-unread-articles-in-group
-                    info (gnus-active (gnus-info-group info))
-                    t))))))
+                    info (gnus-active (gnus-info-group info))))))))
     (gnus-message 6 "Checking new news...done")))
 
 (defun gnus-method-rank (type method)
@@ -1814,8 +1804,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))
@@ -2063,10 +2052,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))