GNU bug report logs - #14207
24.2; insert-file-contents clobbers match data

Previous Next

Package: emacs;

Reported by: Aidan Gauland <aidalgol <at> no8wireless.co.nz>

Date: Mon, 15 Apr 2013 01:02:01 UTC

Severity: minor

Tags: notabug

Found in version 24.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 14207 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Aidan Gauland <aidalgol <at> no8wireless.co.nz>
Cc: 14207 <at> debbugs.gnu.org
Subject: Re: bug#14207: 24.2; insert-file-contents clobbers match data
Date: Mon, 15 Apr 2013 08:16:35 +0300
> From: Aidan Gauland <aidalgol <at> 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.




This bug report was last modified 12 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.