(imap-interactive-login, imap-interactive-login): Tell the user
authorSimon Josefsson <jas@extundo.com>
Fri, 18 Jan 2002 15:32:45 +0000 (15:32 +0000)
committerSimon Josefsson <jas@extundo.com>
Fri, 18 Jan 2002 15:32:45 +0000 (15:32 +0000)
which stream/authenticator is used for the queried
username/password.
(imap-open, imap-authenticate): Set variables.

lisp/ChangeLog
lisp/imap.el

index a4ca197..85630c6 100644 (file)
        (imap-open): Return nil on failure.
        (imap-open): Setup temp buffer correctly.
        (imap-open): Return buffer only on success.
+       (imap-interactive-login, imap-interactive-login): Tell the user
+       which stream/authenticator is used for the queried
+       username/password.
+       (imap-open, imap-authenticate): Set variables.
 
 2002-01-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
index 2b36d79..c6e2649 100644 (file)
@@ -766,12 +766,15 @@ Returns t if login was successful, nil otherwise."
       (while (or (not user) (not passwd))
        (setq user (or imap-username
                       (read-from-minibuffer
-                       (concat "IMAP username for " imap-server ": ")
+                       (concat "IMAP username for " imap-server 
+                               " (using stream `" (symbol-name imap-stream)
+                               "'): ")
                        (or user imap-default-user))))
        (setq passwd (or imap-password
                         (imap-read-passwd
                          (concat "IMAP password for " user "@"
-                                 imap-server ": "))))
+                                 imap-server " (using authenticator `"
+                                 (symbol-name imap-auth) "'): "))))
        (when (and user passwd)
          (if (funcall loginfunc user passwd)
              (progn
@@ -952,6 +955,9 @@ necessery.  If nil, the buffer name is generated."
                    (mapcar 'make-local-variable imap-local-variables)
                    (imap-disable-multibyte)
                    (buffer-disable-undo)
+                   (setq imap-server imap-server)
+                   (setq imap-port imap-port)
+                   (setq imap-auth imap-auth)
                    (message "imap: Reconnecting with stream `%s'..." stream)
                    (if (null (let ((imap-stream stream))
                                (imap-open-1 (current-buffer))))
@@ -1006,19 +1012,19 @@ password is remembered in the buffer."
                                     imap-authenticator-alist)) buffer)
               (setq imap-state 'auth))
        ;; Choose authenticator.
-       (let (auth
-             (auths imap-authenticators))
+       (let ((auths imap-authenticators)
+             auth)
          (while (setq auth (pop auths))
            ;; OK to use authenticator?
            (when (funcall (nth 1 (assq auth imap-authenticator-alist)) buffer)
              (message "imap: Authenticating to `%s' using `%s'..."
                       imap-server auth)
+             (setq imap-auth auth)
              (if (funcall (nth 2 (assq auth imap-authenticator-alist)) buffer)
                  (progn
                    (message "imap: Authenticating to `%s' using `%s'...done"
                             imap-server auth)
-                   (setq imap-auth auth
-                         auths nil))
+                   (setq auths nil))
                (message "imap: Authenticating to `%s' using `%s'...failed"
                         imap-server auth)))))
        imap-state))))