/[emacs]/emacs/lispref/searching.texi
ViewVC logotype

Diff of /emacs/lispref/searching.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.44.2.5 by miles, Wed Sep 29 07:22:16 2004 UTC revision 1.44.2.6 by miles, Thu Oct 14 08:49:57 2004 UTC
# Line 1  Line 1 
1  @c -*-texinfo-*-  @c -*-texinfo-*-
2  @c This is part of the GNU Emacs Lisp Reference Manual.  @c This is part of the GNU Emacs Lisp Reference Manual.
3  @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999  @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004
4  @c   Free Software Foundation, Inc.  @c   Free Software Foundation, Inc.
5  @c See the file elisp.texi for copying conditions.  @c See the file elisp.texi for copying conditions.
6  @setfilename ../info/searching  @setfilename ../info/searching
# Line 694  an @code{invalid-regexp} error is signal Line 694  an @code{invalid-regexp} error is signal
694    
695    Here is a complicated regexp which was formerly used by Emacs to    Here is a complicated regexp which was formerly used by Emacs to
696  recognize the end of a sentence together with any whitespace that  recognize the end of a sentence together with any whitespace that
697  follows.  It was used as the variable @code{sentence-end}.  (Its value  follows.  (Nowadays Emacs uses a similar but more complex default
698  nowadays contains alternatives for @samp{.}, @samp{?} and @samp{!} in  regexp constructed by the function @code{sentence-end}.
699  other character sets.)  @xref{Standard Regexps}.)
700    
701    First, we show the regexp as a string in Lisp syntax to distinguish    First, we show the regexp as a string in Lisp syntax to distinguish
702  spaces from tab characters.  The string constant begins and ends with a  spaces from tab characters.  The string constant begins and ends with a
# Line 730  deciphered as follows: Line 730  deciphered as follows:
730  The first part of the pattern is a character alternative that matches  The first part of the pattern is a character alternative that matches
731  any one of three characters: period, question mark, and exclamation  any one of three characters: period, question mark, and exclamation
732  mark.  The match must begin with one of these three characters.  (This  mark.  The match must begin with one of these three characters.  (This
733  is the one point where the new value of @code{sentence-end} differs  is one point where the new default regexp used by Emacs differs from
734  from the old.  The new value also lists sentence ending  the old.  The new value also allows some non-@acronym{ASCII}
735  non-@acronym{ASCII} characters.)  characters that end a sentence without any following whitespace.)
736    
737  @item []\"')@}]*  @item []\"')@}]*
738  The second part of the pattern matches any closing braces and quotation  The second part of the pattern matches any closing braces and quotation
# Line 1698  whitespace or starting with a form feed Line 1698  whitespace or starting with a form feed
1698  @end defvar  @end defvar
1699    
1700  @defvar sentence-end  @defvar sentence-end
1701  This is the regular expression describing the end of a sentence.  (All  If non-@code{nil}, the value should be a regular expression describing
1702  paragraph boundaries also end sentences, regardless.)  The (slightly  the end of a sentence, including the whitespace following the
1703  simplified) default value is:  sentence.  (All paragraph boundaries also end sentences, regardless.)
1704    
1705  @example  If the value is @code{nil}, the default, then the function
1706  "[.?!][]\"')@}]*\\($\\| $\\|\t\\|@ @ \\)[ \t\n]*"  @code{sentence-end} has to construct the regexp.  That is why you
1707  @end example  should always call the function @code{sentence-end} to obtain the
1708    regexp to be used to recognize the end of a sentence.
 This means a period, question mark or exclamation mark (the actual  
 default value also lists their alternatives in other character sets),  
 followed optionally by closing parenthetical characters, followed by  
 tabs, spaces or new lines.  
   
 For a detailed explanation of this regular expression, see @ref{Regexp  
 Example}.  
1709  @end defvar  @end defvar
1710    
1711    @defun sentence-end
1712    This function returns the value of the variable @code{sentence-end},
1713    if non-@code{nil}.  Otherwise it returns a default value based on the
1714    values of the variables @code{sentence-end-double-space}
1715    (@pxref{Definition of sentence-end-double-space}),
1716    @code{sentence-end-without-period} and
1717    @code{sentence-end-without-space}.
1718    @end defun
1719    
1720  @ignore  @ignore
1721     arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f     arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f
1722  @end ignore  @end ignore

Legend:
Removed from v.1.44.2.5  
changed lines
  Added in v.1.44.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26