Apply John Wiegley's patch.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 11 Apr 2000 00:42:33 +0000 (00:42 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 11 Apr 2000 00:42:33 +0000 (00:42 +0000)
lisp/ChangeLog
lisp/mail-source.el

index 2a38040..e339ba0 100644 (file)
@@ -1,3 +1,14 @@
+2000-04-10 20:35:46  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * mail-source.el (mail-source-fetch-webmail): Use the default
+       password provided in mail-sources; use webmail:subtype:user as
+       the key.
+       
+2000-04-10 20:35:46  John Wiegley <johnw@gnu.org>
+
+       * mail-source.el (mail-source-fetch-webmail): Use
+       mail-source-password-cache.
+
 2000-04-09 18:13:47  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * webmail.el: Add netscape mail and fix HotMail mail.
index 6c8e74a..2fb2b28 100644 (file)
@@ -690,8 +690,15 @@ This only works when `display-time' is enabled."
       (when (eq authentication 'password)
        (setq password
              (or password
+                 (cdr (assoc (format "webmail:%s:%s" subtype user) 
+                             mail-source-password-cache))
                  (mail-source-read-passwd
-                  (format "Password for %s at %s: " user subtype)))))
+                  (format "Password for %s at %s: " user subtype))))
+       (when (and password
+                  (not (assoc (format "webmail:%s:%s" subtype user) 
+                              mail-source-password-cache)))
+         (push (cons (format "webmail:%s:%s" subtype user) password) 
+               mail-source-password-cache)))
       (webmail-fetch mail-source-crash-box subtype user password)
       (mail-source-callback callback (symbol-name subtype)))))