From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Discrepancy in definition/use of match-data? Date: Wed, 23 Jun 2004 18:53:47 +0900 Organization: The XEmacs Project Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87r7s6a9ck.fsf@tleepslib.sk.tsukuba.ac.jp> 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> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1087984469 1423 80.91.224.253 (23 Jun 2004 09:54:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Jun 2004 09:54:29 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jun 23 11:54:20 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 1Bd4SS-0006Bv-00 for ; Wed, 23 Jun 2004 11:54:20 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bd4SR-00089o-00 for ; Wed, 23 Jun 2004 11:54:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bd4Tn-00025J-M9 for emacs-devel@quimby.gnus.org; Wed, 23 Jun 2004 05:55:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bd4Tl-00025C-9c for emacs-devel@gnu.org; Wed, 23 Jun 2004 05:55:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bd4Tk-00024t-E6 for emacs-devel@gnu.org; Wed, 23 Jun 2004 05:55:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bd4Tk-00024j-9u for emacs-devel@gnu.org; Wed, 23 Jun 2004 05:55:40 -0400 Original-Received: from [130.158.98.109] (helo=tleepslib.sk.tsukuba.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bd4Ry-00068l-QW; Wed, 23 Jun 2004 05:53:51 -0400 Original-Received: from steve by tleepslib.sk.tsukuba.ac.jp with local (Exim 3.36 #1 (Debian)) id 1Bd4Rv-0001cS-00; Wed, 23 Jun 2004 18:53:47 +0900 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Fri, 18 Jun 2004 23:19:52 -0400") User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux) 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:25209 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25209 >>>>> "rms" == Richard Stallman writes: 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} rms> It is checking whether the last match for the search string rms> was empty. I think this change should make it work without rms> using the match-data. Does it work? Your change eliminates the match-data access, of course, but I just realized as I tried to test it that I really don't have a feel for what "work" means. I don't use regexp-isearch very often, and regexps that match the null string almost never. As far as I can tell in a few days testing string searching and the simple regexps that I commonly use are producing no surprises, and "artificial" regexps that should match the empty string do, while other matchers do not. Repeat regexp searches for ".*" behave the same with both implementations, including wrapping around bob and eob. So I would say it works. Well enough to install in our beta tree, anyway. *** 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. -- Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software.