Commit 4c0a6d4a authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Fix bug that f in Rmail, in some situations, would insert entire Rmail file.

parent ad33a799
2013-01-13 Richard Stallman <>
* mail/rmailmm.el (rmail-insert-mime-forwarded-message): Get
current message boundaries and pass them to
message-forward-make-body-mime. Minor style changes.
2013-01-13 Eli Zaretskii <>
* cus-start.el (all): Avoid warnings about
2013-01-13 Richard Stallman <>
* 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 <>
* gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string
......@@ -37,6 +43,7 @@
(mml-smime-epg-find-usable-secret-key): New helper function copied from
2012-12-31 Lars Magne Ingebrigtsen <>
* gnus-msg.el (gnus-inews-insert-gcc): Don't insert Gcc headers if Gnus
......@@ -7376,12 +7376,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")
(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: "))
......@@ -1365,14 +1365,15 @@ The arguments ARG and STATE have no effect in this case."
(defun rmail-insert-mime-forwarded-message (forward-buffer)
"Insert the message in FORWARD-BUFFER as a forwarded message.
This is the usual value of `rmail-insert-mime-forwarded-message-function'."
(let ((message-buffer
(with-current-buffer forward-buffer
(if rmail-buffer-swapped
(narrow-to-region (point) (point))
(message-forward-make-body-mime message-buffer))))
(let (contents-buffer start end)
(with-current-buffer forward-buffer
(setq contents-buffer
(if rmail-buffer-swapped
start (rmail-msgbeg rmail-current-message)
end (rmail-msgend rmail-current-message)))
(message-forward-make-body-mime contents-buffer start end)))
(setq rmail-insert-mime-forwarded-message-function
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