From: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: emacs-devel@gnu.org
Subject: Re: Discrepancy in definition/use of match-data?
Date: Wed, 23 Jun 2004 18:53:47 +0900 [thread overview]
Message-ID: <87r7s6a9ck.fsf@tleepslib.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <E1BbWOW-0001K5-Hn@fencepost.gnu.org> (Richard Stallman's message of "Fri, 18 Jun 2004 23:19:52 -0400")
>>>>> "rms" == Richard Stallman <rms@gnu.org> 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.
next prev parent reply other threads:[~2004-06-23 9:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-09 15:37 Discrepancy in definition/use of match-data? David Kastrup
2004-06-10 23:01 ` Richard Stallman
2004-06-10 23:56 ` David Kastrup
2004-06-11 8:34 ` Stephen J. Turnbull
2004-06-11 8:54 ` David Kastrup
2004-06-12 6:45 ` Stephen J. Turnbull
2004-06-12 9:03 ` David Kastrup
2004-06-13 0:01 ` Richard Stallman
2004-06-14 5:06 ` Stephen J. Turnbull
2004-06-14 9:05 ` David Kastrup
2004-06-14 10:05 ` Stephen J. Turnbull
2004-06-16 7:13 ` Stephen J. Turnbull
2004-06-19 3:19 ` Richard Stallman
2004-06-23 9:53 ` Stephen J. Turnbull [this message]
2004-06-19 3:19 ` Richard Stallman
2004-06-12 1:51 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r7s6a9ck.fsf@tleepslib.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.