Silence XEmacs compilation warnings.
[gnus] / lisp / nnimap.el
index d3bb685..53bc2dd 100644 (file)
@@ -130,7 +130,7 @@ textual parts.")
 (defcustom nnimap-request-articles-find-limit nil
   "Limit the number of articles to look for after moving an article."
   :type 'integer
-  :version "24.2"
+  :version "24.3"
   :group 'nnimap)
 
 (defvar nnimap-process nil)
@@ -985,11 +985,13 @@ textual parts.")
 If LIMIT, first try to limit the search to the N last articles."
   (with-current-buffer (nnimap-buffer)
     (erase-buffer)
-    (let* ((number-of-article
-           (catch 'found
-             (dolist (result (cdr (nnimap-change-group group server nil t)))
-               (when (equal "EXISTS" (cadr result))
-                 (throw 'found (car result))))))
+    (let* ((change-group-result (nnimap-change-group group server nil t))
+           (number-of-article
+            (and (listp change-group-result)
+                 (catch 'found
+                   (dolist (result (cdr change-group-result))
+                     (when (equal "EXISTS" (cadr result))
+                       (throw 'found (car result)))))))
            (sequence
             (nnimap-send-command "UID SEARCH%s HEADER Message-Id %S"
                                  (if (and limit number-of-article)
@@ -1693,10 +1695,14 @@ If LIMIT, first try to limit the search to the N last articles."
            nil t))))))
 
 (defun nnimap-change-group (group &optional server no-reconnect read-only)
-  "Change group to GROUP.
+  "Change group to GROUP if non-nil.
 If SERVER is set, check that server is connected, otherwise retry
-to reconnect, unless NO-RECONNECT is set to t.
-if READ-ONLY is set, send EXAMINE rather than SELECT to the server."
+to reconnect, unless NO-RECONNECT is set to t.  Return nil if
+unsuccessful in connecting.
+If GROUP is nil, return t.
+If READ-ONLY is set, send EXAMINE rather than SELECT to the server.
+Return the server's response to the SELECT or EXAMINE command.
+"
   (let ((open-result t))
     (when (and server
               (not (nnimap-server-opened server)))
@@ -1908,15 +1914,6 @@ if READ-ONLY is set, send EXAMINE rather than SELECT to the server."
          (forward-line 1)))
       (buffer-substring (point) end))))
 
-(defun nnimap-get-responses (sequences)
-  (let (responses)
-    (dolist (sequence sequences)
-      (goto-char (point-min))
-      (when (re-search-forward (format "^%d " sequence) nil t)
-       (push (list sequence (nnimap-parse-response))
-             responses)))
-    responses))
-
 (defvar nnimap-incoming-split-list nil)
 
 (defun nnimap-fetch-inbox (articles)