Function: mm-copy-to-buffer
mm-copy-to-buffer is a byte-compiled function defined in
mm-decode.el.gz.
Signature
(mm-copy-to-buffer)
Documentation
Copy the contents of the current buffer to a fresh buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/mm-decode.el.gz
(defun mm-copy-to-buffer ()
"Copy the contents of the current buffer to a fresh buffer."
(let ((obuf (current-buffer))
(mb enable-multibyte-characters)
beg)
(goto-char (point-min))
(search-forward-regexp "^\n" nil 'move) ;; There might be no body.
(setq beg (point))
(with-current-buffer
(generate-new-buffer " *mm*")
;; Preserve the data's unibyteness (for url-insert-file-contents).
(set-buffer-multibyte mb)
(insert-buffer-substring obuf beg)
(current-buffer))))