- (loop for header in headers
- if (not (or (eq 'to (car header))
- (eq 'subject (car header))))
- collect header)))
- (message-sort-headers)
- (message-hide-headers)
- (save-excursion
- (goto-char (point-max))
- (insert body))
- (set-buffer-modified-p nil)))
+ (message-headers-to-generate headers t '(to subject))))
+ ;; insert the message body - but put it in front of the signature
+ ;; if one is present
+ (goto-char (point-max))
+ (if (re-search-backward message-signature-separator nil t)
+ (forward-line -1)
+ (goto-char (point-max)))
+ (insert body))
+ (set-buffer-modified-p nil)
+
+ (message-goto-body))