diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/simple.el | 35 |
2 files changed, 40 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d0be747b87..72be092c851 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-12-07 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * simple.el (compose-mail): Check for incompatibilities and warn. | ||
| 4 | (compose-mail-user-agent-warnings): New option. | ||
| 5 | |||
| 1 | 2009-12-07 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2009-12-07 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | Support showing a single log entry from vc-annotate. | 8 | Support showing a single log entry from vc-annotate. |
diff --git a/lisp/simple.el b/lisp/simple.el index d1656b64919..774b69a4842 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5558,6 +5558,15 @@ See also `read-mail-command' concerning reading mail." | |||
| 5558 | :version "23.2" ; sendmail->message | 5558 | :version "23.2" ; sendmail->message |
| 5559 | :group 'mail) | 5559 | :group 'mail) |
| 5560 | 5560 | ||
| 5561 | (defcustom compose-mail-user-agent-warnings t | ||
| 5562 | "If non-nil, `compose-mail' warns about changes in `mail-user-agent'. | ||
| 5563 | If the value of `mail-user-agent' is the default, and the user | ||
| 5564 | appears to have customizations applying to the old default, | ||
| 5565 | `compose-mail' issues a warning." | ||
| 5566 | :type 'boolean | ||
| 5567 | :version "23.2" | ||
| 5568 | :group 'mail) | ||
| 5569 | |||
| 5561 | (define-mail-user-agent 'sendmail-user-agent | 5570 | (define-mail-user-agent 'sendmail-user-agent |
| 5562 | 'sendmail-user-agent-compose | 5571 | 'sendmail-user-agent-compose |
| 5563 | 'mail-send-and-exit) | 5572 | 'mail-send-and-exit) |
| @@ -5627,6 +5636,32 @@ SEND-ACTIONS is a list of actions to call when the message is sent. | |||
| 5627 | Each action has the form (FUNCTION . ARGS)." | 5636 | Each action has the form (FUNCTION . ARGS)." |
| 5628 | (interactive | 5637 | (interactive |
| 5629 | (list nil nil nil current-prefix-arg)) | 5638 | (list nil nil nil current-prefix-arg)) |
| 5639 | |||
| 5640 | ;; In Emacs 23.2, the default value of `mail-user-agent' changed | ||
| 5641 | ;; from sendmail-user-agent to message-user-agent. Some users may | ||
| 5642 | ;; encounter incompatibilities. This hack tries to detect problems | ||
| 5643 | ;; and warn about them. | ||
| 5644 | (and compose-mail-user-agent-warnings | ||
| 5645 | (eq mail-user-agent 'message-user-agent) | ||
| 5646 | (let (warn-vars) | ||
| 5647 | (dolist (var '(mail-mode-hook mail-send-hook mail-setup-hook | ||
| 5648 | mail-yank-hooks mail-archive-file-name | ||
| 5649 | mail-default-reply-to mail-mailing-lists | ||
| 5650 | mail-self-blind mail-setup-with-from)) | ||
| 5651 | (and (boundp var) | ||
| 5652 | (symbol-value var) | ||
| 5653 | (push var warn-vars))) | ||
| 5654 | (when warn-vars | ||
| 5655 | (display-warning 'mail | ||
| 5656 | (format "\ | ||
| 5657 | The default mail mode is now Message mode. | ||
| 5658 | You have the following Mail mode variable%s customized: | ||
| 5659 | \n %s\n\nTo use Mail mode, set `mail-user-agent' to sendmail-user-agent. | ||
| 5660 | To disable this warning, set `compose-mail-check-user-agent' to nil." | ||
| 5661 | (if (> (length warn-vars) 1) "s" "") | ||
| 5662 | (mapconcat 'symbol-name | ||
| 5663 | warn-vars " ")))))) | ||
| 5664 | |||
| 5630 | (let ((function (get mail-user-agent 'composefunc))) | 5665 | (let ((function (get mail-user-agent 'composefunc))) |
| 5631 | (funcall function to subject other-headers continue | 5666 | (funcall function to subject other-headers continue |
| 5632 | switch-function yank-action send-actions))) | 5667 | switch-function yank-action send-actions))) |