changeset 32464:c3aecbe98b99

Non-ASCII in regexp ranges.
author Dave Love <fx@gnu.org>
date Fri, 13 Oct 2000 16:36:35 +0000
parents 4253a5015157
children 355b97042e28
files lispref/searching.texi
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/searching.texi	Fri Oct 13 14:20:54 2000 +0000
+++ b/lispref/searching.texi	Fri Oct 13 16:36:35 2000 +0000
@@ -311,10 +311,17 @@
 To include @samp{^} in a character alternative, put it anywhere but at
 the beginning.
 
-The beginning and end of a range must be in the same character set
-(@pxref{Character Sets}).  Thus, @samp{[a-\x8e0]} is invalid because
-@samp{a} is in the @sc{ascii} character set but the character 0x8e0
-(@samp{a} with grave accent) is in the Emacs character set for Latin-1.
+The beginning and end of a range of multibyte characters must be in the
+same character set (@pxref{Character Sets}).  Thus, @samp{[\x8e0-\x97c]}
+is invalid because character 0x8e0 (@samp{a} with grave accent) is in
+the Emacs character set for Latin-1 but the character 0x97c (@samp{u}
+with diaeresis) is in the Emacs character set for Latin-2.
+
+If a range starts with a unibyte character @var{c} and ends with a
+multibyte character @var{c2}, the range is divided into two parts: one
+is @samp{@var{c}..?\377}, the other is @samp{@var{c1}..@var{c2}}, where
+@var{c1} is the first character of the charset to which @var{c2}
+belongs.
  
 You cannot always match all non-@sc{ascii} characters with the regular
 expression @samp{[\200-\377]}.  This works when searching a unibyte