emacs-devel
[Top][All Lists]
Advanced

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

Re: Make regexp handling more regular


From: Stefan Monnier
Subject: Re: Make regexp handling more regular
Date: Wed, 02 Dec 2020 14:24:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Whatever the name is, we should make sure they don’t introduce even more
> confusion on top of the already confusing names.
>
> re-search-forward
> re-search-backward
> re-search
> re-match
>
> It’s hard to see what each function does from a glance, IMO. That’s not
> counting string regexp functions.

The `re-search` I propose would work both for strings and buffers
(depending on OBJECT), and both forward and backward (depending on the
relative position of START and END, probably with some convention to
simplify the common "from point to point-min").

>> I'd also suggest to make those functions accept other arguments than
>> strings for REGEXP, i.e. to make them into generic functions.
> It would be cool if these functions accept rx forms.

If they're generic functions, rx.el could do that indeed.


        Stefan




reply via email to

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