GNU bug report logs - #21279
24.4; (match-end 0) doesn't always return nil when previous string-match fails

Previous Next

Package: emacs;

Reported by: Ernesto Alfonso <erjoalgo <at> gmail.com>

Date: Mon, 17 Aug 2015 06:27:02 UTC

Severity: minor

Found in version 24.4

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 21279 <at> debbugs.gnu.org (full text, mbox):

From: Ernesto Alfonso <erjoalgo <at> gmail.com>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Ernesto Alfonso <erjoalgo <at> gmail.com>, 21279 <at> debbugs.gnu.org
Subject: Re: bug#21279: 24.4;
 (match-end 0) doesn't always return nil when previous string-match
 fails
Date: Mon, 17 Aug 2015 03:34:06 -0400
I see.

I think the documentation of match-end and others should be updated, though, since right now it is a little misleading:

"Value is nil if SUBEXPth pair didn't match, or there were less than
  SUBEXP pairs.
"

seems to suggest that if match fails, value should be nil. I was certaily confused.

Ernesto
Andreas Schwab <schwab <at> suse.de> writes:

> Ernesto Alfonso <erjoalgo <at> gmail.com> writes:
>
>> (match-end 0) doesn't always return nil when previous string-match fails:
>
> A failing match doesn't set match-data.
>
> Andreas.




This bug report was last modified 10 years and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.