Subject: Re: bug#14207: 24.2; insert-file-contents clobbers match data

From: Aidan Gauland <[email-masked]>
Date: Tue, 16 Apr 2013 13:22:12 +1200

Eli Zaretskii <[email-masked]> writes:

>> From: Aidan Gauland <[email-masked]>
>> Date: Mon, 15 Apr 2013 12:56:26 +1200
>> 
>> If (and only if) the match data is non-nil when `insert-file-contents'
>> is called, it clobbers the match-data.
>
> And why is that a bug?
>
> From the ELisp manual (node "Match Data"):
>
>      Notice that all functions are allowed to overwrite the match data
>   unless they're explicitly documented not to do so.
>
> 'insert-file-contents' is not documented to preserve match data.

Oh, OK.  I thought it was the other way around: functions are supposed
to explicitly be documented as modifying the match data.