Subject: Replacing text add also the comma
From: Angelo Graziosi <[email-masked]>
To: [email-masked]
Date: Sat, 04 Jul 2015 00:15:35 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Suppose one has a file with this text

$ cat foo.log
abcd r8 efg
foo(a_r8,b_r8,c_r8)

Try to replace 'r8' with 'DP', i.e. in the minibuffer,

M-% <RETURN>
Query replace:
r8 <RETURN>
Query replace r8 with: DP

The 'r8' on the first row is replaced correctly while on the second row 
also the comma is added to the text 'r8' to be replaced.

foo.log becomes

$ cat foo.log
abcd DP efg
foo(a_DPb_DPc_DP)

Soppose, now, that foo(a_r8,b_r8,c_r8) is a Fortran/C/C++ routine...

Is this intentional or a bug?

I discovered this with recent (master) builds on MSYS2-MINGW64 (64bit 
Windows native). I suspect this also regards the builds on other systems..

Angelo