# HG changeset patch # User Katsumi Yamaoka # Date 1273462763 0 # Node ID c8dacd2579e6a9878a1a344d1eabd4caed59772e # Parent fd328ff8d24c273be4f62b0cdc2ac088be2aa16e Synch with Gnus trunk. (message-forward-make-body-plain, message-forward-make-body-mml): Don't use mm-with-unibyte-current-buffer. diff -r fd328ff8d24c -r c8dacd2579e6 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Mon May 10 03:37:53 2010 +0000 +++ b/lisp/gnus/ChangeLog Mon May 10 03:39:23 2010 +0000 @@ -1,4 +1,10 @@ -2010-05-07 Christian von Roques (tiny change) +2010-05-10 Katsumi Yamaoka + + * message.el (message-forward-make-body-plain) + (message-forward-make-body-mml): + Don't use mm-with-unibyte-current-buffer. + +2010-05-07 Christian von Roques (tiny change) * mml2015.el (mml2015-epg-find-usable-key): Skip disabled key (Bug#5592). diff -r fd328ff8d24c -r c8dacd2579e6 lisp/gnus/message.el --- a/lisp/gnus/message.el Mon May 10 03:37:53 2010 +0000 +++ b/lisp/gnus/message.el Mon May 10 03:39:23 2010 +0000 @@ -7161,14 +7161,20 @@ (defun message-forward-make-body-plain (forward-buffer) (insert "\n-------------------- Start of forwarded message --------------------\n") - (let ((b (point)) e) + (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 - (mm-disable-multibyte) - (insert - (with-current-buffer forward-buffer - (mm-with-unibyte-current-buffer (buffer-string)))) - (mm-enable-multibyte) + (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 ") @@ -7212,18 +7218,24 @@ (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n") (let ((b (point)) e) (if (not message-forward-decoded-p) - (insert - (with-temp-buffer - (mm-disable-multibyte) - (insert - (with-current-buffer forward-buffer - (mm-with-unibyte-current-buffer (buffer-string)))) - (mm-enable-multibyte) - (mime-to-mml) - (goto-char (point-min)) - (when (looking-at "From ") - (replace-match "X-From-Line: ")) - (buffer-string))) + (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)))) (save-restriction (narrow-to-region (point) (point)) (mml-insert-buffer forward-buffer)