From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Kenichi Handa <handa@m17n.org>
Cc: 4209@debbugs.gnu.org, cyd@stupidchicken.com
Subject: bug#4209: 23.1; Emacs 23.1 regression in re-search-forward
Date: Wed, 27 Jan 2010 09:34:38 -0500 [thread overview]
Message-ID: <jwviqanliww.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <tl7k4v4w1e0.fsf@m17n.org> (Kenichi Handa's message of "Wed, 27 Jan 2010 14:41:11 +0900")
>> > Could you try to investigate Bug#4209?
>> Ok, I'll work on it.
> I fixed it as below.
> === modified file 'src/regex.c'
> --- src/regex.c 2010-01-13 08:35:10 +0000
> +++ src/regex.c 2010-01-27 03:57:03 +0000
> @@ -4083,8 +4083,7 @@
> the corresponding multibyte character. */
> int c = RE_CHAR_TO_MULTIBYTE (p[1]);
> - if (! CHAR_BYTE8_P (c))
> - fastmap[CHAR_LEADING_CODE (c)] = 1;
> + fastmap[CHAR_LEADING_CODE (c)] = 1;
> }
> }
> break;
> But, first of all, I don't know (remember) why there was this check:
> if (! CHAR_BYTE8_P (c))
> I may have overlooked something. Stefan, could you please
> confirm that the above change is correct?
The preceding comment keeps me puzzled. I thought that we only ever
matched re_patterns and buffers of the same multibyteness, i.e. if
a unibyte regexp is matched against a multibyte buffer it should first
be turned into a multibyte regexp and then re_compiled, so the case of:
/* For the case of matching this unibyte regex
against multibyte, we must set a leading code of
the corresponding multibyte character. */
should never happen in analyse_first. Yet, if your patch fixes the bug,
that indicates that apparently it *does* happen.
Stefan
next prev parent reply other threads:[~2010-01-27 14:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 0:50 bug#4209: 23.1; Emacs 23.1 regression in re-search-forward Christopher J. Madsen
2010-01-26 20:38 ` Chong Yidong
2010-01-27 3:43 ` Kenichi Handa
2010-01-27 5:41 ` Kenichi Handa
2010-01-27 14:34 ` Stefan Monnier [this message]
2010-01-27 16:43 ` Chong Yidong
2010-01-28 1:18 ` Kenichi Handa
2010-01-28 19:01 ` Stefan Monnier
2010-01-29 6:15 ` Kenichi Handa
-- strict thread matches above, loose matches on Subject: below --
2009-12-02 0:21 Matthew Dempsky
2009-12-07 3:30 Christopher J. Madsen
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=jwviqanliww.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=4209@debbugs.gnu.org \
--cc=cyd@stupidchicken.com \
--cc=handa@m17n.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.