message.el (message-forward-make-body-mime): New args BEG, END
authorRichard Stallman <rms@gnu.org>
Sun, 13 Jan 2013 22:55:45 +0000 (22:55 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 13 Jan 2013 22:55:45 +0000 (22:55 +0000)
 specify what part of FORWARD-BUFFER to use.  Do the work directly
 instead of calling `mml-insert-buffer'.

lisp/ChangeLog
lisp/message.el

index fcd9b75..2f0f38d 100644 (file)
@@ -1,3 +1,9 @@
+2013-01-13  Richard Stallman  <rms@gnu.org>
+
+       * message.el (message-forward-make-body-mime): New args BEG, END
+       specify what part of FORWARD-BUFFER to use.  Do the work directly
+       instead of calling `mml-insert-buffer'.
+
 2013-01-11  Aaron S. Hawley  <Aaron.Hawley@vtinfo.com>
 
        * gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string
index 755cc8c..21847ac 100644 (file)
@@ -7420,12 +7420,13 @@ Optional DIGEST will use digest to forward."
        (dolist (elem ignored)
          (message-remove-header elem t))))))
 
-(defun message-forward-make-body-mime (forward-buffer)
+(defun message-forward-make-body-mime (forward-buffer &optional beg end)
   (let ((b (point)))
     (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")
     (save-restriction
       (narrow-to-region (point) (point))
-      (mml-insert-buffer forward-buffer)
+      (insert-buffer-substring forward-buffer beg end)
+      (mml-quote-region (point-min) (point-max))
       (goto-char (point-min))
       (when (looking-at "From ")
        (replace-match "X-From-Line: "))