Function: rmail-swap-buffers
rmail-swap-buffers is a byte-compiled function defined in rmail.el.gz.
Signature
(rmail-swap-buffers)
Documentation
Swap text between current buffer and rmail-view-buffer.
This function preserves the current buffer's modified flag, and also
sets the current buffer's buffer-file-coding-system to that of
rmail-view-buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
(defun rmail-swap-buffers ()
"Swap text between current buffer and `rmail-view-buffer'.
This function preserves the current buffer's modified flag, and also
sets the current buffer's `buffer-file-coding-system' to that of
`rmail-view-buffer'."
(let ((modp-this (buffer-modified-p))
(modp-that
(with-current-buffer rmail-view-buffer (buffer-modified-p)))
(coding-this buffer-file-coding-system)
(coding-that
(with-current-buffer rmail-view-buffer
buffer-file-coding-system)))
(buffer-swap-text rmail-view-buffer)
(setq buffer-file-coding-system coding-that)
(with-current-buffer rmail-view-buffer
(setq buffer-file-coding-system coding-this)
(restore-buffer-modified-p modp-that))
(restore-buffer-modified-p modp-this)))