Function: insert-register
insert-register is an interactive and byte-compiled function defined
in register.el.gz.
Signature
(insert-register REGISTER &optional ARG)
Documentation
Insert contents of REGISTER at point.
REGISTER is a character, the name of the register. Normally puts point before and mark after the inserted text, but if optional second argument ARG is non-nil, puts mark before and point after. Interactively, ARG is nil if prefix arg is supplied, and t otherwise.
Interactively, prompt for REGISTER using register-read-with-preview.
Probably introduced at or before Emacs version 19.20.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/register.el.gz
(defun insert-register (register &optional arg)
"Insert contents of REGISTER at point.
REGISTER is a character, the name of the register.
Normally puts point before and mark after the inserted text, but
if optional second argument ARG is non-nil, puts mark before and
point after. Interactively, ARG is nil if prefix arg is supplied,
and t otherwise.
Interactively, prompt for REGISTER using `register-read-with-preview'."
(interactive (progn
(barf-if-buffer-read-only)
(list (register-read-with-preview "Insert register: ")
(not current-prefix-arg))))
(push-mark)
(let ((val (get-register register)))
(register-val-insert val))
(if (not arg) (exchange-point-and-mark)))