From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: find-file-noselect needs save-match-data Date: Fri, 08 Jun 2007 11:42:03 +0200 Message-ID: <4669246B.2060801@gmx.at> References: <46643852.6070709@gmx.at> <46665AD7.7040706@gmx.at> <87k5ueq23m.fsf@kfs-lx.testafd.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181296168 798 80.91.229.12 (8 Jun 2007 09:49:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Jun 2007 09:49:28 +0000 (UTC) Cc: herberteuler@hotmail.com, emacs-devel@gnu.org, rms@gnu.org, Stefan Monnier To: "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 08 11:49:26 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hwb5w-0001s1-N2 for ged-emacs-devel@m.gmane.org; Fri, 08 Jun 2007 11:49:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hwb5w-0001LA-8p for ged-emacs-devel@m.gmane.org; Fri, 08 Jun 2007 05:49:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HwayV-0006CN-Nd for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:41:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HwayT-0006Ae-HY for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:41:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwayS-0006AL-Fl for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:41:40 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HwayR-0005Fq-Mq for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:41:40 -0400 Original-Received: (qmail invoked by alias); 08 Jun 2007 09:41:38 -0000 Original-Received: from N811P012.adsl.highway.telekom.at (EHLO [62.47.45.76]) [62.47.45.76] by mail.gmx.net (mp047) with SMTP; 08 Jun 2007 11:41:38 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18R5hJU2Q0RYvn5aSHhp0CczSQ6bdd6s1aD04Ll5I ZY5s4dFf+21cUe User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <87k5ueq23m.fsf@kfs-lx.testafd.dk> X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:72480 Archived-At: > It's quite the opposite IMO. "safe" can mean many things, whereas > "nodata" clearly indicates that it doesn't set (or modify) match-data. "-nodata" is good. > But in practice, we should have a macro to encapsulate calls: > > (preserve-match-data (string-match ...)) This would violate referential transparency. Consider (defvar foobar "foobar") (defun foo () (string-match "foo" foobar) (match-string 0 foobar)) (defun bar () (string-match "bar" foobar) (preserve-match-data (foo)))