Commit 8b320e66 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka

Synch with Gnus trunk.

(message-forward-make-body-mml): Assume original message is multibyte string;
 error on unibyte.
(message-forward-make-body-plain): Ditto;
 don't add excessive newline in body end.
parent 902a6d8d
2010-05-12 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-forward-make-body-mml): Assume original message
is multibyte string; error on unibyte.
(message-forward-make-body-plain): Ditto; don't add excessive newline
in body end.
2010-05-11 Andreas Seltenreich <seltenreich@gmx.de>
* gnus-sum.el (gnus-summary-kill-thread): Use gnus-summary-mark-article
......
......@@ -7162,27 +7162,27 @@ Optional DIGEST will use digest to forward."
(insert
"\n-------------------- Start of forwarded message --------------------\n")
(let ((b (point))
contents multibyte-p e)
(with-current-buffer forward-buffer
(setq contents (buffer-string)
multibyte-p (mm-multibyte-p)))
(insert
(with-temp-buffer
(if multibyte-p
(progn
(mm-enable-multibyte)
(insert contents))
(mm-disable-multibyte)
(insert contents)
(mm-enable-multibyte))
(mime-to-mml)
(goto-char (point-min))
(when (looking-at "From ")
(replace-match "X-From-Line: "))
(buffer-string)))
(contents (with-current-buffer forward-buffer (buffer-string)))
e)
(unless (featurep 'xemacs)
(unless (multibyte-string-p contents)
(error "Attempt to insert unibyte string from the buffer \"%s\"\
to the multibyte buffer \"%s\""
(if (bufferp forward-buffer)
(buffer-name forward-buffer)
forward-buffer)
(buffer-name))))
(insert (mm-with-multibyte-buffer
(insert contents)
(mime-to-mml)
(goto-char (point-min))
(when (looking-at "From ")
(replace-match "X-From-Line: "))
(buffer-string)))
(unless (bolp) (insert "\n"))
(setq e (point))
(insert
"\n-------------------- End of forwarded message --------------------\n")
"-------------------- End of forwarded message --------------------\n")
(message-remove-ignored-headers b e)))
(defun message-remove-ignored-headers (b e)
......@@ -7218,24 +7218,22 @@ Optional DIGEST will use digest to forward."
(insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
(let ((b (point)) e)
(if (not message-forward-decoded-p)
(let (contents multibyte-p)
(with-current-buffer forward-buffer
(setq contents (buffer-string)
multibyte-p (mm-multibyte-p)))
(insert
(with-temp-buffer
(if multibyte-p
(progn
(mm-enable-multibyte)
(insert contents))
(mm-disable-multibyte)
(insert contents)
(mm-enable-multibyte))
(mime-to-mml)
(goto-char (point-min))
(when (looking-at "From ")
(replace-match "X-From-Line: "))
(buffer-string))))
(let ((contents (with-current-buffer forward-buffer (buffer-string))))
(unless (featurep 'xemacs)
(unless (multibyte-string-p contents)
(error "Attempt to insert unibyte string from the buffer \"%s\"\
to the multibyte buffer \"%s\""
(if (bufferp forward-buffer)
(buffer-name forward-buffer)
forward-buffer)
(buffer-name))))
(insert (mm-with-multibyte-buffer
(insert contents)
(mime-to-mml)
(goto-char (point-min))
(when (looking-at "From ")
(replace-match "X-From-Line: "))
(buffer-string))))
(save-restriction
(narrow-to-region (point) (point))
(mml-insert-buffer forward-buffer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment