emacs-devel
[Top][All Lists]
Advanced

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

Re: Improve `replace-regexp-in-string' ergonomics?


From: Po Lu
Subject: Re: Improve `replace-regexp-in-string' ergonomics?
Date: Wed, 22 Sep 2021 13:24:25 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Which is somewhat more readable (but note that this totally breaks down
> if you want to mix in LITERAL etc).  But I wonder whether we should
> consider renaming the function to something more palatable, and since we
> have `string-replace', why not `regexp-replace'?  The length of the name
> of this common function is itself offputting.

In my Emacs configuration, there is already a function named
`regexp-replace', that has about 45 callers.

I don't know what it does, and it would be nice to not have to find out.

How about an additional argument to `string-replace', that when non-nil
causes string-replace to behave like replace-regexp-in-string?


reply via email to

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