Function: insert-into-buffer
insert-into-buffer is a byte-compiled function defined in subr.el.gz.
Signature
(insert-into-buffer BUFFER &optional START END)
Documentation
Insert the contents of the current buffer into BUFFER.
If START/END, only insert that region from the current buffer. Point in BUFFER will be placed after the inserted text.
Probably introduced at or before Emacs version 28.1.
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun insert-into-buffer (buffer &optional start end)
"Insert the contents of the current buffer into BUFFER.
If START/END, only insert that region from the current buffer.
Point in BUFFER will be placed after the inserted text."
(let ((current (current-buffer)))
(with-current-buffer buffer
(insert-buffer-substring current start end))))