Subject: Re: bug#15836: 24.3; query-replace-regexp does not detect incorrect usage of \#

From: Marcin Kasperski <[email-masked]>
Date: Wed, 13 Nov 2013 21:34:58 +0100

"Error evaluating replacement expression: ... " would be a bit better,
it would point toward replacement expression as something suspicious.

On Sat, Nov 9, 2013 at 12:15 AM, Stefan Monnier
<[email-masked]> wrote:
>> Hmm, perhaps replace-eval-replacement could temporarily bind
>> the function definition of replace-count to some informative error
>> message ("\# used in function context")?
>
> Sorry, I don't like this idea.  Much too specific to the particular way
> the user screwed up.
>
> I guess we could byte-compile the expression, which would give the user
> actual warnings about his code before running it, but I'm afraid this
> medicine would be worse than the disease.
>
> Another approach would be to refrain from substituting \# and
> instead to let-bind it during the evaluation.
>
>
>         Stefan