Oops! I've misunderstood. The last change was removed.
[gnus] / lisp / imap.el
index 15894ff..48106fd 100644 (file)
@@ -528,7 +528,7 @@ If ARGS, PROMPT is used as an argument to `format'."
                                (not (string-match "failed" response))))
                (setq done process)
              (if (memq (process-status process) '(open run))
-                 (imap-send-command-wait "LOGOUT"))
+                 (imap-send-command "LOGOUT"))
              (delete-process process)
              nil)))))
     done))
@@ -588,7 +588,7 @@ If ARGS, PROMPT is used as an argument to `format'."
                                (not (string-match "failed" response))))
                (setq done process)
              (if (memq (process-status process) '(open run))
-                 (imap-send-command-wait "LOGOUT"))
+                 (imap-send-command "LOGOUT"))
              (delete-process process)
              nil)))))
     done))
@@ -852,7 +852,7 @@ Returns t if login was successful, nil otherwise."
   t)
 
 (defun imap-anonymous-auth (buffer)
-  (message "imap: Loging in anonymously...")
+  (message "imap: Logging in anonymously...")
   (with-current-buffer buffer
     (imap-ok-p (imap-send-command-wait
                (concat "LOGIN anonymous \"" (concat (user-login-name) "@"
@@ -957,8 +957,8 @@ necessery.  If nil, the buffer name is generated."
                    (imap-disable-multibyte)
                    (buffer-disable-undo)
                    (setq imap-server (or server imap-server))
-                   (setq imap-port imap-port)
-                   (setq imap-auth imap-auth)
+                   (setq imap-port (or port imap-port))
+                   (setq imap-auth (or auth imap-auth))
                    (message "imap: Reconnecting with stream `%s'..." stream)
                    (if (null (let ((imap-stream stream))
                                (imap-open-1 (current-buffer))))