Function: register-read-with-preview

register-read-with-preview is a byte-compiled function defined in register.el.gz.

Signature

(register-read-with-preview PROMPT &optional PRED)

Documentation

Read register name, prompting with PROMPT; possibly show existing registers.

This reads and returns the name of a register. PROMPT should be a string to prompt the user for the name. If help-char (or a member of help-event-list) is pressed, display preview window unconditionally.

PRED if non-nil should be a function specifying the kinds of registers that can be used. It is called with one argument, a register value, and should return non-nil if and only if that register value can be used. The register value nil represents an empty register.

This calls the function specified by register--read-with-preview-function.

View in manual

Probably introduced at or before Emacs version 24.4.

Source Code

;; Defined in /usr/src/emacs/lisp/register.el.gz
(defun register-read-with-preview (prompt &optional pred)
  "Read register name, prompting with PROMPT; possibly show existing registers.
This reads and returns the name of a register.  PROMPT should be a string
to prompt the user for the name.
If `help-char' (or a member of `help-event-list') is pressed,
display preview window unconditionally.

PRED if non-nil should be a function specifying the kinds of registers that
can be used.  It is called with one argument, a register value, and should
return non-nil if and only if that register value can be used.
The register value nil represents an empty register.

This calls the function specified by `register--read-with-preview-function'."
  (funcall register--read-with-preview-function prompt pred))