[Top][All Lists]

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

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

From: Thierry Volpiatto
Subject: Re: Improve `replace-regexp-in-string' ergonomics?
Date: Tue, 12 Oct 2021 13:33:21 +0000

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> BTW, the current limit on backrefs is just due to a lack of syntax for
>> higher-numbered backrefs, so it would be easy to lift this limit: it's
>> a small matter of choosing an appropriate syntax and then adjusting the
>> code that parses the regexps in regexp.c.
> A small matter indeed.  :-/
> But perhaps it would be worth doing -- arbitrary limitations like that
> goes against everything GNU stands for!

What about providing a simple anaphoric `and`?

    (let ((bar "bar"))
      (helm-aand bar
                 (replace-regexp-in-string "b" "f" it)
                 (replace-regexp-in-string "a" "o" it)
                 (replace-regexp-in-string "r" "o" it)))

And in addition it can be used for something else.


reply via email to

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