(message-generate-headers): Record insertion of optional headers as well.
authorAndreas Seltenreich <andreas+git@gate450.dyndns.org>
Thu, 22 Apr 2010 08:12:53 +0000 (10:12 +0200)
committerAndreas Seltenreich <andreas+git@gate450.dyndns.org>
Thu, 22 Apr 2010 08:12:53 +0000 (10:12 +0200)
Otherwise the check to prevent repeated insertion of optional headers
is a no-op.

lisp/ChangeLog
lisp/message.el

index edd2bdc..cb21b9d 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-22  Andreas Seltenreich  <seltenreich@gmx.de>
+
+       * message.el (message-generate-headers): Record insertion of optional
+       headers as well.  Otherwise the check to prevent repeated insertion of
+       optional headers is a no-op.
+
 2010-04-17  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * smime.el: Don't mention CVS.
index 018646d..6b8b0f5 100644 (file)
@@ -5878,6 +5878,7 @@ Headers already prepared in the buffer are not modified."
                      (if formatter
                          (funcall formatter header value)
                        (insert header-string ": " value))
+                     (push header-string message-inserted-headers)
                      (goto-char (message-fill-field))
                      ;; We check whether the value was ended by a
                      ;; newline.  If not, we insert one.