GNU bug report logs -
#23005
24.4; regexp replace evaluating replacements in incorrect order
Previous Next
Full log
View this message in rfc822 format
Ernesto Alfonso <erjoalgo <at> 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
This bug report was last modified 5 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.