Re: replace-regexp-in-string, using the dyn scoped variable STR

From:

Lennart Borgman

Subject:

Re: replace-regexp-in-string, using the dyn scoped variable STR

Date:

Thu, 12 Nov 2009 23:07:37 +0100

On Thu, Nov 12, 2009 at 6:05 PM, Stefan Monnier
<address@hidden> wrote:
>>>> `str' has the same value as `m'.
>>> No, it doesn't: str is "the whole string" whereas m is only the
>>> (match-string 0) part of it
>> Which is always a prefix of str, and only different from str if the
>> match was empty.
>
> Duh, you're right. Not sure what I was smoking when I tried replacing
> str with m. So, even more reasons to discourage the use of `str'.
Thanks for the help. I still wonder why I used `str'. I am not smoking.