From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Discrepancy in definition/use of match-data? Date: Fri, 18 Jun 2004 23:19:52 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87n03a7as9.fsf@tleepslib.sk.tsukuba.ac.jp> <87vfhx46lc.fsf@tleepslib.sk.tsukuba.ac.jp> <87vfhu20el.fsf@tleepslib.sk.tsukuba.ac.jp> <87brjkt1pr.fsf@tleepslib.sk.tsukuba.ac.jp> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1087615309 25164 80.91.224.253 (19 Jun 2004 03:21:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 Jun 2004 03:21:49 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jun 19 05:21:45 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BbWQL-0001oU-00 for ; Sat, 19 Jun 2004 05:21:45 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BbWQL-0003Xw-00 for ; Sat, 19 Jun 2004 05:21:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BbWRT-0000Qo-CC for emacs-devel@quimby.gnus.org; Fri, 18 Jun 2004 23:22:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BbWRQ-0000Qd-Ox for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:22:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BbWRQ-0000QR-94 for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:22:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BbWRQ-0000QO-1x for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:22:52 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BbWOW-0006VG-Uh for emacs-devel@gnu.org; Fri, 18 Jun 2004 23:19:53 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1BbWOW-0001K5-Hn; Fri, 18 Jun 2004 23:19:52 -0400 Original-To: "Stephen J. Turnbull" In-reply-to: <87brjkt1pr.fsf@tleepslib.sk.tsukuba.ac.jp> (stephen@xemacs.org) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25104 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25104 OK, I have tripped this in three functions so far. All of them look relevant to GNU Emacs. isearch.el (isearch-repeat): both calls to match-{beginning,end} It is checking whether the last match for the search string was empty. I think this change should make it work without using the match-data. Does it work? *** isearch.el 06 Jun 2004 09:56:16 -0400 1.228 --- isearch.el 18 Jun 2004 22:10:53 -0400 *************** *** 999,1005 **** (if (equal isearch-string "") (setq isearch-success t) ! (if (and isearch-success (equal (match-end 0) (match-beginning 0)) (not isearch-just-started)) ;; If repeating a search that found ;; an empty string, ensure we advance. --- 999,1006 ---- (if (equal isearch-string "") (setq isearch-success t) ! (if (and isearch-success ! (equal (point) isearch-other-end) (not isearch-just-started)) ;; If repeating a search that found ;; an empty string, ensure we advance.