diff lisp/gnus/message.el @ 112256:353c9b74c8b3

* message.el (message-mail): A compose-mail function should accept headers as strings.
author Glenn Morris <rgm@gnu.org>
date Tue, 11 Jan 2011 19:53:28 -0800
parents 376148b31b5e
children 0071290a6df9
line wrap: on
line diff
--- a/lisp/gnus/message.el	Tue Jan 11 21:29:23 2011 -0500
+++ b/lisp/gnus/message.el	Tue Jan 11 19:53:28 2011 -0800
@@ -6493,7 +6493,13 @@
     (message-setup
      (nconc
       `((To . ,(or to "")) (Subject . ,(or subject "")))
-      (when other-headers other-headers))
+      ;; C-h f compose-mail says that headers should be specified as
+      ;; (string . value); however all the rest of message expects
+      ;; headers to be symbols, not strings (eg message-header-format-alist).
+      ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html
+      ;; We need to convert any string input, eg from rmail-start-mail.
+      (dolist (h other-headers other-headers)
+ 	(if (stringp (car h)) (setcar h (intern (capitalize (car h)))))))
      yank-action send-actions continue switch-function)
     ;; FIXME: Should return nil if failure.
     t))
@@ -8195,5 +8201,4 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0
 ;;; message.el ends here