From: Richard M. Stallman Date: Sat, 23 Dec 2006 17:30:42 +0000 (+0000) Subject: (Regexp Search): Explain why forward and reverse regexp X-Git-Tag: emacs-pretest-22.0.93~467 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d1549d4e6d0ae99d6540b62e1579414d7b732750;p=emacs.git (Regexp Search): Explain why forward and reverse regexp search are not mirror images. --- diff --git a/man/ChangeLog b/man/ChangeLog index 32836432ddf..a3447fd1d95 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,13 @@ +2006-12-23 Richard Stallman + + * search.texi (Regexp Search): Explain why forward and reverse regexp + search are not mirror images. + +2006-12-22 Kevin Ryde + + * cl.texi (Sorting Sequences): Typo in sort*, example showed plain + "sort" instead of "sort*". + 2006-12-19 Richard Stallman * calc.texi (History and Acknowledgements): Recognize that Emacs diff --git a/man/search.texi b/man/search.texi index 67b61aeac07..532d58fb9d8 100644 --- a/man/search.texi +++ b/man/search.texi @@ -488,6 +488,13 @@ search can make the cursor move back and start again. For example, if you have searched for @samp{foo} and you add @samp{\|bar}, the cursor backs up in case the first @samp{bar} precedes the first @samp{foo}. + Forward and backward regexp search are not symmetrical, because +regexp matching in Emacs always operates forward, starting with the +beginning of the regexp. Thus, forward regexp search scans forward, +trying a forward match at each possible starting position. Backward +regexp search scans backward, trying a forward match at each possible +starting position. These search methods are not mirror images. + @findex re-search-forward @findex re-search-backward Nonincremental search for a regexp is done by the functions