When I use the query-replace* (perform-replace) functions, I can type "," "to replace but not move point immediately."
During the replacement, the function highlights the match, but if I type ",", the replacement is performed, but the highlighting of the region containing the match is not removed.
For example, if I have the following strings in a buffer:
String to be replaced. Another string.
String to be replaced. Another string.
End
and I evaluate this code:
(query-replace "String to be replaced." "Replacement." nil (point-min) (point-max))
using the "," option, I get the behavior shown in the following .gif (uploading the .gif directly doesn't work):
I find this annoying. Is this an intended behavior or is it a bug?
Note added. I am adding this clarification to better explain my request and to respond to NickD's comments.
The query-replace* (perform-replace) functions highlight the matches in the buffer for which it is possible to accept or reject the replacements. By typing , the act-and-show action in query-replace-map is called (as noted by NickD). act-and-show allows you to verify the result of the replacement before moving on to the next match. This way, you have the opportunity to undo or make further modifications by pausing the function if necessary.
What I find annoying is that act-and-show, once the replacement is made (and while waiting to move to the next match), continues to highlight the region of the buffer related to the match, potentially highlighting a portion of code that has nothing to do with the match or the replacement. I hope this clarification can explain my problem.
This is the highlight before act-and-show:
This is the highlight after act-and-show while query-replace is waiting for confirmation to move on to the next match:
As you can see, a part of the code that has nothing to do with the replacement is highlighted.
Note added. I submitted a bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71430


,is "bound" toact-and-showinquery-replace-map, you might use a key that is "bound" to justact: there are several, the easiest one of which is<SPACE>, butyandYshould also do the same thing. But I may be misunderstanding.showpart?showpart. I mean I need to see what the replacement is/does to choose whether to accept it or not.