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: Inefficient code in reftex-index.el Date: Wed, 08 Jun 2005 11:59:41 -0400 Message-ID: References: <85slzv7j87.fsf@lola.goethe.zz> <858y1n2g75.fsf@lola.goethe.zz> <85oeai1pwq.fsf@lola.goethe.zz> <878y1mkpy3.fsf-monnier+emacs@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1118246656 31297 80.91.229.2 (8 Jun 2005 16:04:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2005 16:04:16 +0000 (UTC) Cc: dominik@science.uva.nl, emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 08 18:04:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dg30s-0008Pg-VV for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 18:02:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg37d-0001vy-74 for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 12:09:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dg33t-0000Ls-SJ for emacs-devel@gnu.org; Wed, 08 Jun 2005 12:05:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dg33n-0000H3-30 for emacs-devel@gnu.org; Wed, 08 Jun 2005 12:05:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg33l-0000Ei-HR for emacs-devel@gnu.org; Wed, 08 Jun 2005 12:05:41 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dg33K-00018c-Cb for emacs-devel@gnu.org; Wed, 08 Jun 2005 12:05:14 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Dg2xx-00062G-Qe; Wed, 08 Jun 2005 11:59:47 -0400 Original-To: Stefan Monnier In-reply-to: <878y1mkpy3.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 07 Jun 2005 14:06:21 -0400) 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:38343 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38343 Actually the only cases I can vaguely remember using the (/ (length (match-data)) 2) idiom didn't use the whole (match-data). They typically used the idiom in order to know *which* subgroup matched (of course it only works if you craft your regexp carefully). Can't you tell that more easily by seeing if match-beginning returns nil?