Function: rmail-output-to-rmail-buffer
rmail-output-to-rmail-buffer is an autoloaded and byte-compiled
function defined in rmailout.el.gz.
Signature
(rmail-output-to-rmail-buffer TEMBUF MSG)
Documentation
Copy message in TEMBUF into the current Rmail buffer.
Do what is necessary to make Rmail know about the new message, then display message number MSG.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmailout.el.gz
(defun rmail-output-to-rmail-buffer (tembuf msg)
"Copy message in TEMBUF into the current Rmail buffer.
Do what is necessary to make Rmail know about the new message, then
display message number MSG."
(save-excursion
(rmail-swap-buffers-maybe)
(rmail-modify-format)
;; Turn on Auto Save mode, if it's off in this buffer but enabled
;; by default.
(and (not buffer-auto-save-file-name)
auto-save-default
(auto-save-mode t))
(rmail-maybe-set-message-counters)
;; Insert the new message after the last old message.
(widen)
(unless (zerop (buffer-size))
;; Make sure the last old message ends with a blank line.
(goto-char (point-max))
(rmail-ensure-blank-line)
;; Insert the new message at the end.
(narrow-to-region (point-max) (point-max)))
(insert-buffer-substring tembuf)
(rmail-count-new-messages t)
;; FIXME should re-use existing windows.
(if (rmail-summary-exists)
(rmail-select-summary (rmail-update-summary)))
(rmail-show-message-1 msg)))