diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-04-10 04:48:05 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-04-10 04:48:05 +0000 |
commit | fca4ec765142cca3fd9b8a638f4cf39a304f7fbc (patch) | |
tree | a8f6ec31956c4e5f75c1cc3bc0fc10975d59a72b | |
parent | 98a326f7ef8fdc7d7ada32078ff8007c6e5f24cd (diff) | |
download | emacs-fca4ec765142cca3fd9b8a638f4cf39a304f7fbc.tar.gz |
* searching.texi (String Search): Document word-search-forward-lax
and word-search-backward-lax.
(Searching and Case): Describe isearch behavior more precisely.
-rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
-rw-r--r-- | doc/lispref/searching.texi | 48 |
2 files changed, 34 insertions, 18 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5b568b627c4..9b1fdf124d2 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -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. diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index eea165d1c1f..bc223f8ac3f 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -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. |