[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Discrepancy in definition/use of match-data?
From: |
Stephen J. Turnbull |
Subject: |
Re: Discrepancy in definition/use of match-data? |
Date: |
Wed, 23 Jun 2004 18:53:47 +0900 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux) |
>>>>> "rms" == Richard Stallman <address@hidden> 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.
- Re: Discrepancy in definition/use of match-data?, (continued)
- Re: Discrepancy in definition/use of match-data?, David Kastrup, 2004/06/11
- Re: Discrepancy in definition/use of match-data?, Stephen J. Turnbull, 2004/06/12
- Re: Discrepancy in definition/use of match-data?, David Kastrup, 2004/06/12
- Re: Discrepancy in definition/use of match-data?, Richard Stallman, 2004/06/12
- Re: Discrepancy in definition/use of match-data?, Stephen J. Turnbull, 2004/06/14
- Re: Discrepancy in definition/use of match-data?, David Kastrup, 2004/06/14
- Re: Discrepancy in definition/use of match-data?, Stephen J. Turnbull, 2004/06/14
- Re: Discrepancy in definition/use of match-data?, Stephen J. Turnbull, 2004/06/16
- Re: Discrepancy in definition/use of match-data?, Richard Stallman, 2004/06/18
- Re: Discrepancy in definition/use of match-data?, Richard Stallman, 2004/06/18
- Re: Discrepancy in definition/use of match-data?,
Stephen J. Turnbull <=
- Re: Discrepancy in definition/use of match-data?, Richard Stallman, 2004/06/11