2010-10-22 Katsumi Yamaoka <yamaoka@jpl.org>
+ * mml.el (mml-preview): Work properly when editing article.
+
* gnus-start.el (gnus-read-active-file-1): Don't add method to
gnus-have-read-active-file if it's already been in.
(require 'gnus-msg) ; for gnus-setup-posting-charset
(save-excursion
(let* ((buf (current-buffer))
+ (article-editing (eq major-mode 'gnus-article-edit-mode))
(message-options message-options)
(message-this-is-mail (message-mail-p))
(message-this-is-news (message-news-p))
(mml-preview-insert-mail-followup-to)
(let ((message-deletable-headers (if (message-news-p)
nil
- message-deletable-headers)))
+ message-deletable-headers))
+ (mail-header-separator (if article-editing
+ ""
+ mail-header-separator)))
(message-generate-headers
(copy-sequence (if (message-news-p)
message-required-news-headers
- message-required-mail-headers))))
- (if (re-search-forward
- (concat "^" (regexp-quote mail-header-separator) "\n") nil t)
- (replace-match "\n"))
- (let ((mail-header-separator ""));; mail-header-separator is removed.
+ message-required-mail-headers)))
+ (if (and (not article-editing)
+ (re-search-forward
+ (concat "^" (regexp-quote mail-header-separator) "\n")
+ nil t))
+ (replace-match "\n"))
+ (setq mail-header-separator "")
(message-sort-headers)
(mml-to-mime))
(if raw