diff options
| -rw-r--r-- | lisp/mail/rmail.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 41b0813707f..b8aa937aec2 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4515,6 +4515,11 @@ TEXT and INDENT are not used." | |||
| 4515 | ;; to "prying eyes." Obviously, this encoding isn't "real security," | 4515 | ;; to "prying eyes." Obviously, this encoding isn't "real security," |
| 4516 | ;; nor is it meant to be. | 4516 | ;; nor is it meant to be. |
| 4517 | 4517 | ||
| 4518 | (defvar rmail--remote-password-host nil | ||
| 4519 | "Last recorded value of the HOST argument to `rmail-get-remote-password'.") | ||
| 4520 | (defvar rmail--remote-password-user nil | ||
| 4521 | "Last recorded value of the USER argument to `rmail-get-remote-password'.") | ||
| 4522 | |||
| 4518 | ;;;###autoload | 4523 | ;;;###autoload |
| 4519 | (defun rmail-set-remote-password (password) | 4524 | (defun rmail-set-remote-password (password) |
| 4520 | "Set PASSWORD to be used for retrieving mail from a POP or IMAP server." | 4525 | "Set PASSWORD to be used for retrieving mail from a POP or IMAP server." |
| @@ -4535,7 +4540,12 @@ machine mymachine login myloginname password mypassword | |||
| 4535 | 4540 | ||
| 4536 | If auth-source search yields no result, prompt the user for the | 4541 | If auth-source search yields no result, prompt the user for the |
| 4537 | password." | 4542 | password." |
| 4538 | (when (not rmail-encoded-remote-password) | 4543 | (when (or (not rmail-encoded-remote-password) |
| 4544 | (not (equal user rmail--remote-password-user)) | ||
| 4545 | (not (equal host rmail--remote-password-host))) | ||
| 4546 | ;; Record the values we will be using from now on. | ||
| 4547 | (setq rmail--remote-password-host host | ||
| 4548 | rmail--remote-password-user user) | ||
| 4539 | (if (not rmail-remote-password) | 4549 | (if (not rmail-remote-password) |
| 4540 | (setq rmail-remote-password | 4550 | (setq rmail-remote-password |
| 4541 | (let ((found (nth 0 (auth-source-search | 4551 | (let ((found (nth 0 (auth-source-search |