[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog simple.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog simple.el |
Date: |
Mon, 07 Dec 2009 16:09:10 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/12/07 16:09:10
Modified files:
lisp : ChangeLog simple.el
Log message:
* simple.el (compose-mail): Check for incompatibilities and warn.
(compose-mail-user-agent-warnings): New option.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16855&r2=1.16856
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.1035&r2=1.1036
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16855
retrieving revision 1.16856
diff -u -b -r1.16855 -r1.16856
--- ChangeLog 7 Dec 2009 09:02:12 -0000 1.16855
+++ ChangeLog 7 Dec 2009 16:09:05 -0000 1.16856
@@ -1,3 +1,8 @@
+2009-12-07 Chong Yidong <address@hidden>
+
+ * simple.el (compose-mail): Check for incompatibilities and warn.
+ (compose-mail-user-agent-warnings): New option.
+
2009-12-07 Dan Nicolaescu <address@hidden>
Support showing a single log entry from vc-annotate.
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.1035
retrieving revision 1.1036
diff -u -b -r1.1035 -r1.1036
--- simple.el 6 Dec 2009 18:48:52 -0000 1.1035
+++ simple.el 7 Dec 2009 16:09:09 -0000 1.1036
@@ -5558,6 +5558,15 @@
:version "23.2" ; sendmail->message
:group 'mail)
+(defcustom compose-mail-user-agent-warnings t
+ "If non-nil, `compose-mail' warns about changes in `mail-user-agent'.
+If the value of `mail-user-agent' is the default, and the user
+appears to have customizations applying to the old default,
+`compose-mail' issues a warning."
+ :type 'boolean
+ :version "23.2"
+ :group 'mail)
+
(define-mail-user-agent 'sendmail-user-agent
'sendmail-user-agent-compose
'mail-send-and-exit)
@@ -5627,6 +5636,32 @@
Each action has the form (FUNCTION . ARGS)."
(interactive
(list nil nil nil current-prefix-arg))
+
+ ;; In Emacs 23.2, the default value of `mail-user-agent' changed
+ ;; from sendmail-user-agent to message-user-agent. Some users may
+ ;; encounter incompatibilities. This hack tries to detect problems
+ ;; and warn about them.
+ (and compose-mail-user-agent-warnings
+ (eq mail-user-agent 'message-user-agent)
+ (let (warn-vars)
+ (dolist (var '(mail-mode-hook mail-send-hook mail-setup-hook
+ mail-yank-hooks mail-archive-file-name
+ mail-default-reply-to mail-mailing-lists
+ mail-self-blind mail-setup-with-from))
+ (and (boundp var)
+ (symbol-value var)
+ (push var warn-vars)))
+ (when warn-vars
+ (display-warning 'mail
+ (format "\
+The default mail mode is now Message mode.
+You have the following Mail mode variable%s customized:
+\n %s\n\nTo use Mail mode, set `mail-user-agent' to sendmail-user-agent.
+To disable this warning, set `compose-mail-check-user-agent' to nil."
+ (if (> (length warn-vars) 1) "s" "")
+ (mapconcat 'symbol-name
+ warn-vars " "))))))
+
(let ((function (get mail-user-agent 'composefunc)))
(funcall function to subject other-headers continue
switch-function yank-action send-actions)))