2004-11-25 Katsumi Yamaoka <yamaoka@jpl.org>
+ * mml.el (mml-preview): Widen the message buffer before copying
+ the contents to the preview buffer; sort headers before previewing.
+
* message.el (message-hidden-headers): Fix the way to avoid a bug
in the `repeat' widget in Emacs 21.3 or earlier.
(message-options-set-recipient)
(when (boundp 'gnus-buffers)
(push mml-preview-buffer gnus-buffers))
- (set-buffer mml-preview-buffer)
- (erase-buffer)
- (insert-buffer-substring buf)
+ (save-restriction
+ (widen)
+ (set-buffer mml-preview-buffer)
+ (erase-buffer)
+ (insert-buffer-substring buf))
(mml-preview-insert-mail-followup-to)
(let ((message-deletable-headers (if (message-news-p)
nil
(concat "^" (regexp-quote mail-header-separator) "\n") nil t)
(replace-match "\n"))
(let ((mail-header-separator ""));; mail-header-separator is removed.
+ (message-sort-headers)
(mml-to-mime))
(if raw
(when (fboundp 'set-buffer-multibyte)