Subject: Re: bug#451: 23.0.60; x-gtk-map-stock destroys match data

From: Stefan Monnier <[email-masked]>
Date: Fri, 20 Jun 2008 10:28:30 -0400

> In the event loop (?), update_frame_tool_bar calls x-gtk-map-stock (in
> x-win.el) which uses string-match.  This changes the match data that
> I need for my application.  I don't know what the rules are about
> using string-match from C code but as a minimum x-gtk-map-stock should
> wrap save-match-data around the call to it.

The match-data is a very volatile piece of data.  So while you may be
right, I think it's more likely that the problem is in your code
(i.e., your code should save the match-data itself if it needs to use
it after some non-trivial code has been run, and by "trivial" I *really*
mean trivial).

        Stefan