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: Kenichi Handa <handa <at> m17n.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 4209 <at> debbugs.gnu.org, cyd <at> stupidchicken.com
Subject: bug#4209: 23.1; Emacs 23.1 regression in re-search-forward
Date: Thu, 28 Jan 2010 10:18:55 +0900
In article <jwviqanliww.fsf-monnier+emacs <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> 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:

Before we changed the behavour of unibyte->multibyte
conversion, that conversion depended on the preferred
charset (thus on lang. env.).  But, Emacs 22 wrongly cached
the pattern converted at some point, and reused it without
checking the change of preferred charset.

So, in emacs-unicode branch, I fixed the regex code so that
unibyte pattern can be directry used for multibyte buffer
search by doing unibyte->multibyte conversion on the fly.
And that code was merged to trunk.

So, 

> 		  /* For the case of matching this unibyte regex
> 		     against multibyte, we must set a leading code of
> 		     the corresponding multibyte character.  */

really happens.

---
Kenichi Handa
handa <at> m17n.org




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.