Subject: Re: bug#8161: 24.0.50; query-replace-regexp fails with interactive replacement text

From: Juri Linkov <[email-masked]>
Date: Fri, 04 Mar 2011 01:04:46 +0200

> This has been broken since
>
> Author: Juri Linkov <[email-masked]>
> Date:   Sat Nov 10 21:48:46 2007 +0000
>
>     (query-replace-show-replacement): New defcustom.
>     (perform-replace): Use `match-substitute-replacement' if
>     `query-replace-show-replacement' is non-nil.

Don't blame the committer ;-)  This feature (\?) is specific to
`query-replace-regexp', so mentioning it in low-level `replace-match'
would be wrong.  It should be dealt at the same level where it's used
in replace.el the same way as \? is processed in `replace-match-maybe-edit'.