From: no-spam@cua.dk (Kim F. Storm)
Cc: bug-gnu-emacs@gnu.org
Subject: Re: `match-data' set improperly
Date: 12 Feb 2003 11:53:24 +0100 [thread overview]
Message-ID: <5xsmutsrbv.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200302120316.h1C3Gvcu007789@beth.swift.xxx>
Matthew Swift <swift@alum.mit.edu> writes:
> Evaluating the following `let' form gives varying results, but the results
> should be consistent. Correct results are always returned when `s' is "The
> quick fox...", which matches the regexp `r'. When `s' is "great grey
> green...", which does not match `r', the results in my trials have never been
> correct: either an 'args-out-of-range' error is raised, or incorrect data is
> given, which appears to be the result of applying match-data from matching a
> previous value of `s' ("The quick fox...") to the current value of `s'. Sample
> results are copied below.
>
> My *guess* is that when `string-match' fails, it either fails to set
> `match-data' or sets it incorrectly in one of two (or more) ways.
My guess is that you are not supposed to use match-data when
string-match fails, so its value is indeed undefined in that case.
What _valid_ values would you expect it to contain after the match failed?
--
Kim F. Storm http://www.cua.dk
next prev parent reply other threads:[~2003-02-12 10:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-12 3:16 `match-data' set improperly Matthew Swift
2003-02-12 10:53 ` Kim F. Storm [this message]
2003-02-12 19:25 ` Matt Swift
[not found] ` <mailman.1845.1045043916.21513.bug-gnu-emacs@gnu.org>
2003-02-12 16:02 ` Kevin Rodgers
2003-02-13 10:08 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2003-02-13 0:54 Luc Teirlinck
2003-02-13 6:42 ` Matt Swift
2003-02-13 12:25 ` Kim F. Storm
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=5xsmutsrbv.fsf@kfs2.cua.dk \
--to=no-spam@cua.dk \
--cc=bug-gnu-emacs@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.