Variable: register-use-preview

register-use-preview is a customizable variable defined in register.el.gz.

Value

traditional

Documentation

Whether register commands show preview of registers with non-nil values.

When set to t, show a preview buffer with navigation and highlighting.

When set to insist, behave as with t, but allow exiting the minibuffer by pressing the register name a second time. For example, press \a to select register "a", then press \a again to exit the minibuffer.

When set to nil, show a preview buffer without navigation and highlighting, and exit the minibuffer immediately after inserting response in minibuffer.

When set to never, behave as with nil, but with no preview buffer at all; the preview buffer is still accessible with help-char (\C-h).

When set to traditional (the default), provide a more basic preview according to register-preview-delay; this preserves the traditional behavior of Emacs 29 and before.

This variable was added, or its default value changed, in Emacs 30.1.

View in manual

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/register.el.gz
(defcustom register-use-preview 'traditional
  "Whether register commands show preview of registers with non-nil values.

When set to t, show a preview buffer with navigation and highlighting.

When set to `insist', behave as with t, but allow exiting the minibuffer by
pressing the register name a second time.  For example, press \\`a' to
select register \"a\", then press \\`a' again to exit the minibuffer.

When set to nil, show a preview buffer without navigation and
highlighting, and exit the minibuffer immediately after inserting
response in minibuffer.

When set to `never', behave as with nil, but with no preview buffer at
all; the preview buffer is still accessible with `help-char' (\\`C-h').

When set to `traditional' (the default), provide a more basic preview
according to `register-preview-delay'; this preserves the traditional
behavior of Emacs 29 and before."
  :type '(choice
          (const :tag "Use preview" t)
          (const :tag "Use preview and exit by pressing register name" insist)
          (const :tag "Use quick preview" nil)
          (const :tag "Never use preview" never)
          (const :tag "Basic preview like Emacs-29" traditional))
  :version "30.1"
  :set (lambda (var val)
         (set var val)
         (setq register--read-with-preview-function
               (if (eq val 'traditional)
                   #'register-read-with-preview-traditional
                 #'register-read-with-preview-fancy))))