emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99831: Better doc fix for Bug#628


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99831: Better doc fix for Bug#6283.
Date: Wed, 02 Jun 2010 13:26:31 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99831
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Wed 2010-06-02 13:26:31 -0400
message:
  Better doc fix for Bug#6283.
  
  searching.texi (Regexp Special): Remove obsolete information
  about matching non-ASCII characters, and suggest using char
  classes (Bug#6283).
modified:
  doc/lispref/ChangeLog
  doc/lispref/searching.texi
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2010-06-02 17:14:01 +0000
+++ b/doc/lispref/ChangeLog     2010-06-02 17:26:31 +0000
@@ -1,7 +1,8 @@
 2010-06-02  Chong Yidong  <address@hidden>
 
-       * searching.texi (Regexp Special): Replace "octal 377"
-       with "#o377" (Bug#6283).
+       * searching.texi (Regexp Special): Remove obsolete information
+       about matching non-ASCII characters, and suggest using char
+       classes (Bug#6283).
 
 2010-05-30  Juanma Barranquero  <address@hidden>
 

=== modified file 'doc/lispref/searching.texi'
--- a/doc/lispref/searching.texi        2010-06-02 17:14:01 +0000
+++ b/doc/lispref/searching.texi        2010-06-02 17:26:31 +0000
@@ -362,7 +362,7 @@
 
 Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and
 @samp{[ad]*} matches any string composed of just @samp{a}s and @samp{d}s
-(including the empty string), from which it follows that @samp{c[ad]*r}
+(including the empty string).  It follows that @samp{c[ad]*r}
 matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc.
 
 You can also include character ranges in a character alternative, by
@@ -400,21 +400,11 @@
 @var{c1} is the first character of the charset to which @var{c2}
 belongs.
 
-You cannot always match all address@hidden characters with the
-regular expression @code{"[\200-\377]"}.  This works when searching a
-unibyte buffer or string (@pxref{Text Representations}), but not in a
-multibyte buffer or string, because many address@hidden
-characters have codes above @code{#o377}.  However, the regular
-expression @code{"[^\000-\177]"} does match all address@hidden
-characters (see below regarding @samp{^}), in both multibyte and
-unibyte representations, because only the @acronym{ASCII} characters
-are excluded.
-
-A character alternative can also specify named
-character classes (@pxref{Char Classes}).  This is a POSIX feature whose
-syntax is @samp{[:@var{class}:]}.  Using a character class is equivalent
-to mentioning each of the characters in that class; but the latter is
-not feasible in practice, since some classes include thousands of
+A character alternative can also specify named character classes
+(@pxref{Char Classes}).  This is a POSIX feature whose syntax is
address@hidden:@var{class}:]}.  Using a character class is equivalent to
+mentioning each of the characters in that class; but the latter is not
+feasible in practice, since some classes include thousands of
 different characters.
 
 @item @samp{[^ @dots{} ]}
@@ -432,6 +422,10 @@
 mentioned as one of the characters not to match.  This is in contrast to
 the handling of regexps in programs such as @code{grep}.
 
+You can specify named character classes, just like in character
+alternatives.  For instance, @samp{[^[:ascii:]]} matches any
address@hidden character.  @xref{Char Classes}.
+
 @item @samp{^}
 @cindex beginning of line in regexp
 When matching a buffer, @samp{^} matches the empty string, but only at the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]