GNU bug report logs - #4209
23.1; Emacs 23.1 regression in re-search-forward

Previous Next

Package: emacs;

Reported by: "Christopher J. Madsen" <cjm <at> cjmweb.net>

Date: Thu, 20 Aug 2009 20:35:06 UTC

Severity: serious

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matthew Dempsky <matthew <at> dempsky.org>
To: 4209 <at> debbugs.gnu.org
Subject: bug#4209: 23.1; Emacs 23.1 regression in re-search-forward
Date: Tue, 1 Dec 2009 16:21:07 -0800
This is a stab in the dark, but the patch below corrects this issue for me:

    $ ./retest.sh
    looking-at: t
    re-search-forward: 9

I don't see any reason this should cause regressions (searching
forward 0 steps seems to me it should be the same as searching
backward 0 steps), but I've only casually looked over regex.c.

--- a/src/regex.c
+++ b/src/regex.c
@@ -4524,7 +4524,7 @@ re_search_2 (bufp, str1, size1, str2, size2,
startpos, range, regs, stop)

          d = POS_ADDR_VSTRING (startpos);

-         if (range > 0)        /* Searching forwards.  */
+         if (range >= 0)       /* Searching forwards.  */
            {
              register int lim = 0;
              int irange = range;



This bug report was last modified 15 years and 115 days ago.

Previous Next


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