From: yamaoka Date: Sat, 13 Mar 2004 00:30:23 +0000 (+0000) Subject: Synch to No Gnus 200403121916. X-Git-Tag: t-gnus-6_17_4-quimby-~1015 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9556092eaa4eadd2fb34284f08bbf5945ab5658;p=elisp%2Fgnus.git- Synch to No Gnus 200403121916. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7919fea..64e6dbe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-03-12 Reiner Steib + + * imap.el (imap-store-password): New variable. + (imap-interactive-login): Use it. + Suggested by Mark Plaksin . + 2004-03-12 Katsumi Yamaoka * gnus-art.el (gnus-article-read-summary-keys): Restore new diff --git a/lisp/imap.el b/lisp/imap.el index ea69dff..56a7e67 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -262,6 +262,11 @@ Shorter values mean quicker response, but is more CPU intensive." :type 'number :group 'imap) +(defcustom imap-store-password nil + "If non-nil, store session password without promting." + :group 'imap + :type 'boolean) + ;; Various variables. (defvar imap-fetch-data-hook nil @@ -811,9 +816,10 @@ Returns t if login was successful, nil otherwise." (progn (setq ret t imap-username user) - (if (and (not imap-password) - (y-or-n-p "Store password for this session? ")) - (setq imap-password passwd))) + (when (and (not imap-password) + (or imap-store-password + (y-or-n-p "Store password for this session? "))) + (setq imap-password passwd))) (message "Login failed...") (setq passwd nil) (setq imap-password nil)