Add docstrings
[gnus] / lisp / nnimap.el
index 9013206..8ea5063 100644 (file)
@@ -174,7 +174,7 @@ textual parts.")
            (return)))
        (setq article (match-string 1))
        ;; Unfold quoted {number} strings.
-       (while (re-search-forward "[^]] {\\([0-9]+\\)}\r\n"
+       (while (re-search-forward "[^]][ (]{\\([0-9]+\\)}\r\n"
                                  (1+ (line-end-position)) t)
          (setq size (string-to-number (match-string 1)))
          (delete-region (+ (match-beginning 0) 2) (point))
@@ -1009,7 +1009,6 @@ textual parts.")
     (with-current-buffer (nnimap-buffer)
       (erase-buffer)
       (setf (nnimap-group nnimap-object) nil)
-      ;; QRESYNC handling isn't implemented.
       (let ((qresyncp (member "QRESYNC" (nnimap-capabilities nnimap-object)))
            params groups sequences active uidvalidity modseq group)
        ;; Go through the infos and gather the data needed to know
@@ -1048,12 +1047,7 @@ textual parts.")
                                               (utf7-encode group t))
                          (nnimap-send-command "UID FETCH %d:* FLAGS" start)
                          start group command)
-                   sequences)))
-         ;; Some servers apparently can't have many outstanding
-         ;; commands, so throttle them.
-         (when (and (not nnimap-streaming)
-                    (car sequences))
-           (nnimap-wait-for-response (caar sequences))))
+                   sequences))))
        sequences))))
 
 (deffoo nnimap-finish-retrieve-group-infos (server infos sequences)
@@ -1431,6 +1425,10 @@ textual parts.")
            (if (nnimap-newlinep nnimap-object)
                ""
              "\r"))))
+  ;; Some servers apparently can't have many outstanding
+  ;; commands, so throttle them.
+  (unless nnimap-streaming
+    (nnimap-wait-for-response nnimap-sequence))
   nnimap-sequence)
 
 (defun nnimap-log-command (command)