* searching.texi (String Search): Document word-search-forward-lax
authorChong Yidong <cyd@stupidchicken.com>
Fri, 10 Apr 2009 04:48:05 +0000 (04:48 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 10 Apr 2009 04:48:05 +0000 (04:48 +0000)
and word-search-backward-lax.
(Searching and Case): Describe isearch behavior more precisely.

doc/lispref/ChangeLog
doc/lispref/searching.texi

index 5b568b6..9b1fdf1 100644 (file)
@@ -1,5 +1,9 @@
 2009-04-10  Chong Yidong  <cyd@stupidchicken.com>
 
+       * searching.texi (String Search): Document word-search-forward-lax
+       and word-search-backward-lax.
+       (Searching and Case): Describe isearch behavior more precisely.
+
        * keymaps.texi (Tool Bar): Mention that some platforms do not
        support multi-line toolbars.  Suggested by Stephen Eglen.
 
index eea165d..bc223f8 100644 (file)
@@ -106,11 +106,9 @@ leaves point at the beginning of the match.
 @end deffn
 
 @deffn Command word-search-forward string &optional limit noerror repeat
-@c  @cindex word search   Redundant
 This function searches forward from point for a ``word'' match for
 @var{string}.  If it finds a match, it sets point to the end of the
 match found, and returns the new value of point.
-@c Emacs 19 feature
 
 Word matching regards @var{string} as a sequence of words, disregarding
 punctuation that separates them.  It searches the buffer for the same
@@ -155,6 +153,13 @@ If @var{repeat} is non-@code{nil}, then the search is repeated that many
 times.  Point is positioned at the end of the last match.
 @end deffn
 
+@deffn Command word-search-forward-lax string &optional limit noerror repeat
+This command is identical to @code{word-search-forward}, except that
+the end of @code{string} need not match a word boundary unless it ends
+in whitespace.  For instance, searching for @samp{ball boy} matches
+@samp{ball boyee}, but does not match @samp{aball boy}.
+@end deffn
+
 @deffn Command word-search-backward string &optional limit noerror repeat
 This function searches backward from point for a word match to
 @var{string}.  This function is just like @code{word-search-forward}
@@ -162,6 +167,12 @@ except that it searches backward and normally leaves point at the
 beginning of the match.
 @end deffn
 
+@deffn Command word-search-backward-lax string &optional limit noerror repeat
+This command is identical to @code{word-search-backward}, except that
+the end of @code{string} need not match a word boundary unless it ends
+in whitespace.
+@end deffn
+
 @node Searching and Case
 @section Searching and Case
 @cindex searching and case
@@ -181,21 +192,11 @@ Buffer-Local}.)  Alternatively, you may change the value of
 @code{case-fold-search} for buffers that do not override it.
 
   Note that the user-level incremental search feature handles case
-distinctions differently.  When given a lower case letter, it looks for
-a match of either case, but when given an upper case letter, it looks
-for an upper case letter only.  But this has nothing to do with the
-searching functions used in Lisp code.
-
-@defopt case-replace
-This variable determines whether the higher level replacement
-functions should preserve case.  If the variable is @code{nil}, that
-means to use the replacement text verbatim.  A non-@code{nil} value
-means to convert the case of the replacement text according to the
-text being replaced.
-
-This variable is used by passing it as an argument to the function
-@code{replace-match}.  @xref{Replacing Match}.
-@end defopt
+distinctions differently.  When the search string contains only lower
+case letters, the search ignores case, but when the search string
+contains one or more upper case letters, the search becomes
+case-sensitive.  But this has nothing to do with the searching
+functions used in Lisp code.
 
 @defopt case-fold-search
 This buffer-local variable determines whether searches should ignore
@@ -209,12 +210,23 @@ The value of this variable is the default value for
 same as @code{(default-value 'case-fold-search)}.
 @end defvar
 
+@defopt case-replace
+This variable determines whether the higher level replacement
+functions should preserve case.  If the variable is @code{nil}, that
+means to use the replacement text verbatim.  A non-@code{nil} value
+means to convert the case of the replacement text according to the
+text being replaced.
+
+This variable is used by passing it as an argument to the function
+@code{replace-match}.  @xref{Replacing Match}.
+@end defopt
+
 @node Regular Expressions
 @section Regular Expressions
 @cindex regular expression
 @cindex regexp
 
-  A @dfn{regular expression} (@dfn{regexp}, for short) is a pattern that
+  A @dfn{regular expression}, or @dfn{regexp} for short, is a pattern that
 denotes a (possibly infinite) set of strings.  Searching for matches for
 a regexp is a very powerful operation.  This section explains how to write
 regexps; the following section says how to search for them.