bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#23005: 24.4; regexp replace evaluating replacements in incorrect ord


From: Lars Ingebrigtsen
Subject: bug#23005: 24.4; regexp replace evaluating replacements in incorrect order
Date: Mon, 29 Jul 2019 14:59:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Ernesto Alfonso <erjoalgo@gmail.com> writes:

> when using replace-regexp with both expressions (ie \,) and simple
> string replacements (ie \?), the expression replacement is evaluated
> first, even if it comes after the \? replacement.
>
> Example:
>
> Replace regexp (default '.*?', *'.*' -> '\?', '\,(read-string "silly
> expression")'):
>
> the (read-string "silly expression") is evaluated before the first "\?".

I'm not sure this is a bug -- the doc string doesn't say anything about
the order these things are done in.  On the other hand, it doesn't seem
very useful to do the evaluation first.  If the evaluation could return
things like \&, then perhaps doing it first would be useful...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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