+2010-10-21 Julien Danjou <julien@danjou.info>
+
+ * message.texi (Message Headers): Allow message-default-headers to be a
+ function.
+
2010-10-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-news.texi: Mention new archive defaults.
@item message-default-headers
@vindex message-default-headers
This string is inserted at the end of the headers in all message
-buffers.
+buffers. If set to a function, the returned results is inserted.
@item message-subject-re-regexp
@vindex message-subject-re-regexp
+2010-10-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * message.el (message-mode-map): Don't bind M-; to comment region, to
+ allow the global comment-dwim to work.
+
+2010-10-21 Julien Danjou <julien@danjou.info>
+
+ * message.el (message-setup-1): Allow message-default-headers to be a
+ function.
+
2010-10-21 Katsumi Yamaoka <yamaoka@jpl.org>
* shr.el (shr-tag-table): Simplify.
:error "All header lines must be newline terminated")
(defcustom message-default-headers ""
- "*A string containing header lines to be inserted in outgoing messages.
-It is inserted before you edit the message, so you can edit or delete
-these lines."
+ "A string containing header lines to be inserted in outgoing messages.
+It is inserted before you edit the message, so you can edit or
+delete these lines. If set to a function, it is called and its
+result is inserted."
:version "23.2"
:group 'message-headers
:link '(custom-manual "(message)Message Headers")
(define-key message-mode-map "\C-a" 'message-beginning-of-line)
(define-key message-mode-map "\t" 'message-tab)
- (define-key message-mode-map "\M-;" 'comment-region)
(define-key message-mode-map "\M-n" 'message-display-abbrev))
headers)
(delete-region (point) (progn (forward-line -1) (point)))
(when message-default-headers
- (insert message-default-headers)
+ (insert
+ (if (functionp message-default-headers)
+ (funcall message-default-headers)
+ message-default-headers))
(or (bolp) (insert ?\n)))
(insert mail-header-separator "\n")
(forward-line -1)