2001-11-02 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Fri, 2 Nov 2001 21:10:01 +0000 (21:10 +0000)
committerSimon Josefsson <jas@extundo.com>
Fri, 2 Nov 2001 21:10:01 +0000 (21:10 +0000)
* gnus-int.el (gnus-check-server): Message "...done" when done.

* imap.el (imap-close): Don't message (imap-send-command-wait
returns if the connection is dropped).
(imap-wait-for-tag): Nix out message only when necessary.

lisp/ChangeLog
lisp/gnus-int.el
lisp/imap.el

index 02830ee..4720f08 100644 (file)
@@ -1,5 +1,11 @@
 2001-11-02  Simon Josefsson  <jas@extundo.com>
 
+       * gnus-int.el (gnus-check-server): Message "...done" when done.
+
+       * imap.el (imap-close): Don't message (imap-send-command-wait
+       returns if the connection is dropped).
+       (imap-wait-for-tag): Nix out message only when necessary.
+
        * gnus-sieve.el (gnus-sieve-script): Use "stop" instead of "elsif"
        for non-crossposting.
        (gnus-sieve-crosspost): Default to t to be consistent with other
index e7462e9..f95804e 100644 (file)
@@ -110,7 +110,8 @@ If CONFIRM is non-nil, the user will be asked for an NNTP server."
   "Check whether the connection to METHOD is down.
 If METHOD is nil, use `gnus-select-method'.
 If it is down, start it up (again)."
-  (let ((method (or method gnus-select-method)))
+  (let ((method (or method gnus-select-method))
+       result)
     ;; Transform virtual server names into select methods.
     (when (stringp method)
       (setq method (gnus-server-to-method method)))
@@ -125,11 +126,14 @@ If it is down, start it up (again)."
       (gnus-run-hooks 'gnus-open-server-hook)
       (prog1
          (condition-case ()
-             (gnus-open-server method)
+             (setq result (gnus-open-server method))
            (quit (message "Quit gnus-check-server")
                  nil))
        (unless silent
-         (message ""))))))
+         (gnus-message 5 "Opening %s server%s...%s" (car method)
+                       (if (equal (nth 1 method) "") ""
+                         (format " on %s" (nth 1 method)))
+                       (if result "done" "failed")))))))
 
 (defun gnus-get-function (method function &optional noerror)
   "Return a function symbol based on METHOD and FUNCTION."
index c607cfa..b72e3aa 100644 (file)
@@ -1022,9 +1022,8 @@ password is remembered in the buffer."
   "Close connection to server in BUFFER.
 If BUFFER is nil, the current buffer is used."
   (with-current-buffer (or buffer (current-buffer))
-    (and (imap-opened)
-        (not (imap-ok-p (imap-send-command-wait "LOGOUT")))
-        (message "Server %s didn't let me log out" imap-server))
+    (when (imap-opened)
+      (imap-send-command-wait "LOGOUT"))
     (when (and imap-process
               (memq (process-status imap-process) '(open run)))
       (delete-process imap-process))
@@ -1678,20 +1677,23 @@ on failure."
 
 (defun imap-wait-for-tag (tag &optional buffer)
   (with-current-buffer (or buffer (current-buffer))
-    (while (and (null imap-continuation)
-               (memq (process-status imap-process) '(open run))
-               (< imap-reached-tag tag))
-      (let ((len (/ (point-max) 1024))
-           message-log-max)
-       (unless (< len 10)
-         (message "imap read: %dk" len))
-       (accept-process-output imap-process 1)))
-    (message "")
-    (and (memq (process-status imap-process) '(open run))
-        (or (assq tag imap-failed-tags)
-            (if imap-continuation
-                'INCOMPLETE
-              'OK)))))
+    (let (imap-have-messaged)
+      (while (and (null imap-continuation)
+                 (memq (process-status imap-process) '(open run))
+                 (< imap-reached-tag tag))
+       (let ((len (/ (point-max) 1024))
+             message-log-max)
+         (unless (< len 10)
+           (setq imap-have-messaged t)
+           (message "imap read: %dk" len))
+         (accept-process-output imap-process 1)))
+      (when imap-have-messaged
+       (message ""))
+      (and (memq (process-status imap-process) '(open run))
+          (or (assq tag imap-failed-tags)
+              (if imap-continuation
+                  'INCOMPLETE
+                'OK))))))
 
 (defun imap-sentinel (process string)
   (delete-process process))