[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange results from lwarn + match-string
From: |
Stefan Monnier |
Subject: |
Re: Strange results from lwarn + match-string |
Date: |
Tue, 19 Feb 2008 22:39:48 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>> (lwarn t :warning "0: %s" (match-string-no-properties 0))
>>> (lwarn t :warning "1: %s" (match-string-no-properties 1))
>>> (lwarn t :warning "2: %s" (match-string-no-properties 2))
>>> (lwarn t :warning "3: %s" (match-string-no-properties 3))
>>
>> Since you don't know for a fact that lwarn is among the few functions
>> that do not affect match-data, you need to call all
>> 4 `match-string-no-properties' before you call the 4 `lwarn'.
> Hm. It cured the problem, but that was really a surprise.
There are very few functions which guarantee that they preserve
match-data, so if there's the slightest doubt, assume that match-data
will be destroyed,
Stefan