changeset 102921:7c6f05477556

* searching.texi (String Search): Document word-search-forward-lax and word-search-backward-lax. (Searching and Case): Describe isearch behavior more precisely.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 10 Apr 2009 04:48:05 +0000
parents 44495616088c
children bc1b7462d55e
files doc/lispref/ChangeLog doc/lispref/searching.texi
diffstat 2 files changed, 34 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/doc/lispref/ChangeLog	Fri Apr 10 04:25:43 2009 +0000
+++ b/doc/lispref/ChangeLog	Fri Apr 10 04:48:05 2009 +0000
@@ -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.
 
--- a/doc/lispref/searching.texi	Fri Apr 10 04:25:43 2009 +0000
+++ b/doc/lispref/searching.texi	Fri Apr 10 04:48:05 2009 +0000
@@ -106,11 +106,9 @@
 @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 @@
 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 @@
 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 @@
 @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 @@
 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.