The Code for insert-buffer
Here is the earlier code:
emacs-lisp
(defun insert-buffer (buffer)
"Insert after point the contents of BUFFER.
Puts mark after the inserted text.
BUFFER may be a buffer or a buffer name."
(interactive "*bInsert buffer: ")emacs-lisp
(or (bufferp buffer)
(setq buffer (get-buffer buffer)))
(let (start end newmark)
(save-excursion
(save-excursion
(set-buffer buffer)
(setq start (point-min) end (point-max)))emacs-lisp
(insert-buffer-substring buffer start end)
(setq newmark (point)))
(push-mark newmark)))As with other function definitions, you can use a template to see an outline of the function:
emacs-lisp
(defun insert-buffer (buffer)
"documentation..."
(interactive "*bInsert buffer: ")
body...)