query-replace-to-history-variable

query-replace-to-history-variable is a variable defined in `replace.el'.
Its value is
query-replace-history


Documentation:
History list to use for the TO argument of `query-replace' commands.
The value of this variable should be a symbol; that symbol
is used as a variable to hold a history list for replacement
strings or patterns.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 20.3 of Emacs.