From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: find-file-noselect needs save-match-data Date: Wed, 13 Jun 2007 12:22:45 -0400 Message-ID: References: <46643852.6070709@gmx.at> <46665AD7.7040706@gmx.at> <87k5ueq23m.fsf@kfs-lx.testafd.dk> <87myz8c10t.fsf@jurta.org> <18030.3441.204697.244518@rgrjr.dyndns.org> <87zm3515r4.fsf@jurta.org> <85k5u8x2gm.fsf@lola.goethe.zz> <87r6og6czf.fsf@catnip.gol.com> <85bqfkx0i5.fsf@lola.goethe.zz> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1181752037 17215 80.91.229.12 (13 Jun 2007 16:27:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2007 16:27:17 +0000 (UTC) Cc: juri@jurta.org, schwab@suse.de, emacs-devel@gnu.org, miles.bader@necel.com, miles@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 13 18:27:14 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 1HyVgc-0003Fc-6F for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2007 18:27:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyVgb-00042C-Nc for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2007 12:27:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyVcN-0002J5-JV for emacs-devel@gnu.org; Wed, 13 Jun 2007 12:22:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyVcM-0002If-Tz for emacs-devel@gnu.org; Wed, 13 Jun 2007 12:22:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyVcM-0002IV-IG for emacs-devel@gnu.org; Wed, 13 Jun 2007 12:22:46 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HyVcM-0003zf-Bm for emacs-devel@gnu.org; Wed, 13 Jun 2007 12:22:46 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HyVcL-0001gL-TB; Wed, 13 Jun 2007 12:22:45 -0400 In-reply-to: <85bqfkx0i5.fsf@lola.goethe.zz> (message from David Kastrup on Wed, 13 Jun 2007 00:37:38 +0200) 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:72778 Archived-At: > I think all of those are misleading. > > "string-match-reentrant"? What use is reentrancy in a routine that does not call Lisp and can't be called in interrupts? The question need not be answered. We want a meaningful and clear way to distinguish this function from `string-match'. The fact that it is reentrant is a good way to distinguish. The name looks good. Anyway, such a function should likely _return_ the corresponding match-data (rather than setting a global variable to it), and things like match-beginning should optionally take an argument for this particular match-data. That is a good idea. If there is no match, it returns nil; if there is a match, it returns the match data.