aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2006-03-11 21:23:11 +0000
committerLuc Teirlinck2006-03-11 21:23:11 +0000
commitba44fca9cd7716cb93ec4fc914f917dd3fad1442 (patch)
tree3cc4b6fda32a1990309233e15801749b6d938b31
parent6f49b4c5137e1857d542fc416714107ecdb61092 (diff)
downloademacs-ba44fca9cd7716cb93ec4fc914f917dd3fad1442.tar.gz
emacs-ba44fca9cd7716cb93ec4fc914f917dd3fad1442.zip
(Regexp Special): Use @samp for regular expressions that are not in
Lisp syntax.
-rw-r--r--lispref/searching.texi6
1 files changed, 3 insertions, 3 deletions
diff --git a/lispref/searching.texi b/lispref/searching.texi
index 88009152cc0..9b80fdfd930 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -476,7 +476,7 @@ never remove the special meaning of @samp{-} or @samp{]}. So you
476should not quote these characters when they have no special meaning 476should not quote these characters when they have no special meaning
477either. This would not clarify anything, since backslashes can 477either. This would not clarify anything, since backslashes can
478legitimately precede these characters where they @emph{have} special 478legitimately precede these characters where they @emph{have} special
479meaning, as in @code{[^\]} (@code{"[^\\]"} for Lisp string syntax), 479meaning, as in @samp{[^\]} (@code{"[^\\]"} for Lisp string syntax),
480which matches any single character except a backslash. 480which matches any single character except a backslash.
481 481
482In practice, most @samp{]} that occur in regular expressions close a 482In practice, most @samp{]} that occur in regular expressions close a
@@ -485,8 +485,8 @@ regular expression may try to match a complex pattern of literal
485@samp{[} and @samp{]}. In such situations, it sometimes may be 485@samp{[} and @samp{]}. In such situations, it sometimes may be
486necessary to carefully parse the regexp from the start to determine 486necessary to carefully parse the regexp from the start to determine
487which square brackets enclose a character alternative. For example, 487which square brackets enclose a character alternative. For example,
488@code{[^][]]} consists of the complemented character alternative 488@samp{[^][]]} consists of the complemented character alternative
489@code{[^][]} (which matches any single character that is not a square 489@samp{[^][]} (which matches any single character that is not a square
490bracket), followed by a literal @samp{]}. 490bracket), followed by a literal @samp{]}.
491 491
492The exact rules are that at the beginning of a regexp, @samp{[} is 492The exact rules are that at the beginning of a regexp, @samp{[} is