[Top][All Lists]

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

Re: Imports / inclusion of s.el into Emacs

From: Yuan Fu
Subject: Re: Imports / inclusion of s.el into Emacs
Date: Fri, 1 May 2020 19:00:24 -0400

> On May 1, 2020, at 6:53 PM, Yuan Fu <address@hidden> wrote:
>> On May 1, 2020, at 2:16 PM, Dmitry Gutov <address@hidden> wrote:
>> On 01.05.2020 21:09, Stefan Monnier wrote:
>>> we could probably rename some existing
>>> functions to use the `string-` prefix
>> We have both 'match-string' and 'string-match', which do different things. 
>> Any particular ideas for renaming?
> That reminded me that regex-related functions are not very well-named, namely
> re-search-forward
> re-search-backward
> replace-regexp-in-string
> replace-match
> string-match
> match-string
> These are what I can come think of on top of my head. String-match is 
> especially bad. Every times I search with string with re/regexp and just 
> couldn’t find the function that matches regexp in string… I suggest give 
> every re-related functions a re- prefix. 
> Yuan

What about

re-search-forward               re-search-forward
re-search-backward              re-search-backward
replace-regexp-in-string        re-replace-in-string
replace-match                   re-replace-match
string-match                    re-search-in-string
match-string                    re-matched-string

Or something along that line?


reply via email to

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