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: Thu, 14 Jun 2007 12:19:43 -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 1181838053 4665 80.91.229.12 (14 Jun 2007 16:20:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2007 16:20:53 +0000 (UTC) Cc: miles.bader@necel.com, schwab@suse.de, emacs-devel@gnu.org, juri@jurta.org, miles@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 14 18:20:51 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 1Hys42-0006Qc-V3 for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2007 18:20:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hys42-0003hV-DI for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2007 12:20:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hys30-0002uS-Js for emacs-devel@gnu.org; Thu, 14 Jun 2007 12:19:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hys2z-0002t5-AE for emacs-devel@gnu.org; Thu, 14 Jun 2007 12:19:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hys2y-0002sn-SG for emacs-devel@gnu.org; Thu, 14 Jun 2007 12:19:44 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hys2y-00023s-Kh for emacs-devel@gnu.org; Thu, 14 Jun 2007 12:19:44 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1Hys2x-0004Ep-Vg; Thu, 14 Jun 2007 12:19:43 -0400 In-reply-to: (message from Stefan Monnier on Wed, 13 Jun 2007 13:31:49 -0400) 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:72868 Archived-At: > 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. Then what's the advantage compared to using save-match-data? This function would be simpler, and probably noticeably faster, than (save-match-data (string-match X Y) (match-data)) You have a valid point that this function would be somewhat slower than a similar function which returned only the position of the start of the match. I am not sure whether this speed difference is significant. Would someone like to try implementing those two functions, and see how they compare in speed to the expression above?