Synch to Gnus 200310292115.
authoryamaoka <yamaoka>
Wed, 29 Oct 2003 22:04:59 +0000 (22:04 +0000)
committeryamaoka <yamaoka>
Wed, 29 Oct 2003 22:04:59 +0000 (22:04 +0000)
lisp/ChangeLog
lisp/message.el

index 27709ea..c72ff8d 100644 (file)
@@ -1,3 +1,14 @@
+2003-10-29  Simon Josefsson  <jas@extundo.com>
+
+       * message.el (message-forward-make-body-plain): Fix ARG=1 mode
+       after separating m-f-m-b.
+
+2003-10-29  Simon Josefsson  <jas@extundo.com>
+
+       * message.el (message-forward-make-body-plain): Remove ignored
+       headers.  Tiny patch from Andre Srinivasan <andre@e2open.com>.
+       (message-forward-make-body-plain): Fix ARG=1.
+
 2003-10-28  Jesper Harder  <harder@ifa.au.dk>
 
        * message.el (message-forward-subject-name-subject)
index 77cbe7b..2d3c7cf 100644 (file)
@@ -6750,16 +6750,29 @@ Optional NEWS will use news to forward instead of mail."
   (insert
    "\n-------------------- Start of forwarded message --------------------\n")
   (let ((b (point)) e)
-    (save-restriction
-      (narrow-to-region (point) (point))
-      (mml-insert-buffer forward-buffer)
-      (goto-char (point-min))
-      (when (looking-at "From ")
-       (replace-match "X-From-Line: "))
-      (goto-char (point-max)))
+    (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)))
     (setq e (point))
     (insert
-     "\n-------------------- End of forwarded message --------------------\n")))
+     "\n-------------------- End of forwarded message --------------------\n")
+    (when (and (not current-prefix-arg)
+              message-forward-ignored-headers)
+      (save-restriction
+       (narrow-to-region b e)
+       (goto-char b)
+       (narrow-to-region (point)
+                         (or (search-forward "\n\n" nil t) (point)))
+       (message-remove-header message-forward-ignored-headers t)))))
 
 (defun message-forward-make-body-mime (forward-buffer)
   (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")