bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44861: 27.1; [PATCH] signal in `replace-regexp-in-string'


From: Mattias Engdegård
Subject: bug#44861: 27.1; [PATCH] signal in `replace-regexp-in-string'
Date: Wed, 25 Nov 2020 15:58:22 +0100

forcemerge 15107 44861
stop

Suggested patch attached. A small test suite for replace-regexp-in-string has 
already been pushed to master -- very rudimentary, but better than nothing -- 
and the patch amends it with some new relevant cases that didn't work before.

It is basically your patch but slightly optimised; it turned out that the 
function call and allocation overhead of the original patch made it a tad too 
expensive (a pity, because it was very neat). Now performance is about the same 
as before when the pattern contains no submatches, and slightly above (< 10% 
slower) with one submatch. It seems worth the correctness.

Attachment: 0001-Fix-replace-regexp-in-string-substring-match-data-tr.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]