Variable: query-replace-show-preview
query-replace-show-preview is a customizable variable defined in
replace.el.gz.
Value
nil
Documentation
Non-nil means preview the replacement while you type it.
The matches visible in the window are shown as they would look after
the replacement, using the query-replace-preview face. This tells
you what back-references like \1 expand to before you commit to the
edit. Replacements that use \, or \# are never previewed.
This variable was added, or its default value changed, in Emacs 32.1.
Probably introduced at or before Emacs version 32.1.
Source Code
;; Defined in /usr/src/emacs/lisp/replace.el.gz
(defcustom query-replace-show-preview nil
"Non-nil means preview the replacement while you type it.
The matches visible in the window are shown as they would look after
the replacement, using the `query-replace-preview' face. This tells
you what back-references like \\1 expand to before you commit to the
edit. Replacements that use \\, or \\# are never previewed."
:type 'boolean
:group 'matching
:version "32.1")