diff options
| -rw-r--r-- | lisp/mail/sendmail.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index cfbefd91d93..c9f8fec1e1b 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -505,9 +505,13 @@ This also saves the value of `send-mail-function' via Customize." | |||
| 505 | ;; If send-mail-function is already setup, we're incorrectly called | 505 | ;; If send-mail-function is already setup, we're incorrectly called |
| 506 | ;; a second time, probably because someone's using an old value | 506 | ;; a second time, probably because someone's using an old value |
| 507 | ;; of send-mail-function. | 507 | ;; of send-mail-function. |
| 508 | (when (eq send-mail-function 'sendmail-query-once) | 508 | (if (not (eq send-mail-function 'sendmail-query-once)) |
| 509 | (sendmail-query-user-about-smtp)) | 509 | (funcall send-mail-function) |
| 510 | (funcall send-mail-function)) | 510 | (let ((function (sendmail-query-user-about-smtp))) |
| 511 | (funcall function) | ||
| 512 | (when (y-or-n-p "Save this mail sending choice?") | ||
| 513 | (setq send-mail-function function) | ||
| 514 | (customize-save-variable 'send-mail-function function))))) | ||
| 511 | 515 | ||
| 512 | (defun sendmail-query-user-about-smtp () | 516 | (defun sendmail-query-user-about-smtp () |
| 513 | (let* ((options `(("mail client" . mailclient-send-it) | 517 | (let* ((options `(("mail client" . mailclient-send-it) |
| @@ -552,8 +556,8 @@ This also saves the value of `send-mail-function' via Customize." | |||
| 552 | (completing-read | 556 | (completing-read |
| 553 | (format "Send mail via (default %s): " (caar options)) | 557 | (format "Send mail via (default %s): " (caar options)) |
| 554 | options nil 'require-match nil nil (car options)))))) | 558 | options nil 'require-match nil nil (car options)))))) |
| 555 | (customize-save-variable 'send-mail-function | 559 | ;; Return the choice. |
| 556 | (cdr (assoc-string choice options t))))) | 560 | (cdr (assoc-string choice options t)))) |
| 557 | 561 | ||
| 558 | (defun sendmail-sync-aliases () | 562 | (defun sendmail-sync-aliases () |
| 559 | (when mail-personal-alias-file | 563 | (when mail-personal-alias-file |