message.el (message-mail): A compose-mail function should accept headers as strings.
authorGlenn Morris <rgm@gnu.org>
Sun, 16 Jan 2011 00:41:48 +0000 (00:41 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 16 Jan 2011 00:41:48 +0000 (00:41 +0000)
lisp/ChangeLog
lisp/message.el

index 2ce01f4..a43ed96 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-15  Glenn Morris  <rgm@gnu.org>
+
+       * message.el (message-mail): A compose-mail function should
+       accept headers as strings.
+
 2011-01-13  Chong Yidong  <cyd@stupidchicken.com>
 
        * message.el (message-tool-bar-gnome): Tweak tool-bar items.  Add
index 266578d..f514fd7 100644 (file)
@@ -6556,7 +6556,13 @@ is a function used to switch to and display the mail buffer."
     (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
      return-action)
     ;; FIXME: Should return nil if failure.