[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14207: 24.2; insert-file-contents clobbers match data
From: |
Aidan Gauland |
Subject: |
bug#14207: 24.2; insert-file-contents clobbers match data |
Date: |
Tue, 16 Apr 2013 13:22:12 +1200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Aidan Gauland <aidalgol@no8wireless.co.nz>
>> 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.