Subject: bug#23127: 25.0.92; Assertion failure when editing history in query-replace in cc-mode

From: Alan Mackenzie <[email-masked]>
Date: Tue, 29 Mar 2016 10:03:09 +0000

Hello, Richard.

On Tue, Mar 29, 2016 at 12:24:20AM +0100, Richard Copley wrote:

> Thanks very much Alan.
> I tested your patch and noticed that it fixes query-replace but not
> query-replace-regexp.

Whoops!

> I won't submit a new patch because I don't have the paperwork (sorry),
> but I reckon you just need to move the "(with-current-buffer (...)
> (let (...) ...))" construct outside the "(if regexp-flag ...)". With
> that change it works fine for me.

And it works fine for me, too.  Thanks for spotting that.  I've
committed the fix (to the emacs-25 branch in the savannah repository),
and I'm closing the bug.

-- 
Alan Mackenzie (Nuremberg, Germany).