Skip to content

Use replace regexp in string#210

Merged
matsl merged 8 commits intomasterfrom
use-replace-regexp-in-string
Jul 16, 2022
Merged

Use replace regexp in string#210
matsl merged 8 commits intomasterfrom
use-replace-regexp-in-string

Conversation

@matsl
Copy link
Copy Markdown
Collaborator

@matsl matsl commented Jul 15, 2022

What

hypb:replace-match-string with Emacs replace-regexp-in-string.

Why

The internal hypb function is almost a perfect match with the standard function but with the order of the arguments slightly different which is a bit confusing. The functionality is further more based on replace-regexp-in-string with a few checks performed before dispatching. These small checks does not seem to matter!? (Our unit tests does not complain anyway.)

Note

Since we don't have 100% test coverage this type of change could be a bit dangerous. It is for that reason performed in steps with each commit providing some logic change. The test suite has been run during there commit steps to ensure that error cases are identified and fixed by later steps.

@rswgnu Maybe not a priority but I thought this would be a way to remove the test case that fails for 27.2 related to this functionality. I think you at some occasions been talking about doing this change and I wanted to see how difficult it would be,

@matsl matsl requested a review from rswgnu July 15, 2022 21:45
@matsl matsl merged commit 7c95544 into master Jul 16, 2022
@matsl matsl deleted the use-replace-regexp-in-string branch July 16, 2022 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants