* gnus.el: Update all the copyright notices.
[gnus] / lisp / mail-source.el
index 6c8e74a..7c9dd68 100644 (file)
@@ -1,5 +1,5 @@
 ;;; mail-source.el --- functions for fetching mail
-;; Copyright (C) 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news, mail
@@ -62,7 +62,7 @@ If non-nil, this maildrop will be checked periodically for new mail."
   :group 'mail-source
   :type 'integer)
 
-(defcustom mail-source-delete-incoming t
+(defcustom mail-source-delete-incoming nil
   "*If non-nil, delete incoming files after handling."
   :group 'mail-source
   :type 'boolean)
@@ -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)))))