diff options
| author | Richard M. Stallman | 2005-10-21 18:56:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-10-21 18:56:56 +0000 |
| commit | f4b80eb14c8cd969c80cb68ff9508d9e7011db22 (patch) | |
| tree | cac270286674b97d2cedc34dde8acdd5ccbb4367 | |
| parent | 5ae158bf21d620f7c0d275e8b9719ad0c6df156a (diff) | |
| download | emacs-f4b80eb14c8cd969c80cb68ff9508d9e7011db22.tar.gz emacs-f4b80eb14c8cd969c80cb68ff9508d9e7011db22.zip | |
(sentence-end-base): New variable.
(sentence-end): Use sentence-end-base.
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index f4af34fdabf..1ed43279c3d 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -159,23 +159,32 @@ to obtain the value of this variable." | |||
| 159 | :group 'paragraphs | 159 | :group 'paragraphs |
| 160 | :type '(choice regexp (const :tag "Use default value" nil))) | 160 | :type '(choice regexp (const :tag "Use default value" nil))) |
| 161 | 161 | ||
| 162 | (defcustom sentence-end-base "[.?!][]\"'\xd0c9\x5397d)}]*" | ||
| 163 | "*Regexp matching the basic end of a sentence, not including following space." | ||
| 164 | :group 'paragraphs | ||
| 165 | :type 'string | ||
| 166 | :version "22.1") | ||
| 167 | |||
| 162 | (defun sentence-end () | 168 | (defun sentence-end () |
| 163 | "Return the regexp describing the end of a sentence. | 169 | "Return the regexp describing the end of a sentence. |
| 164 | 170 | ||
| 165 | This function returns either the value of the variable `sentence-end' | 171 | This function returns either the value of the variable `sentence-end' |
| 166 | if it is non-nil, or the default value constructed from the | 172 | if it is non-nil, or the default value constructed from the |
| 167 | variables `sentence-end-double-space', `sentence-end-without-period' | 173 | variables `sentence-end-base', `sentence-end-double-space', |
| 168 | and `sentence-end-without-space'. The default value specifies | 174 | `sentence-end-without-period' and `sentence-end-without-space'. |
| 169 | that in order to be recognized as the end of a sentence, the | 175 | |
| 170 | ending period, question mark, or exclamation point must be | 176 | The default value specifies that in order to be recognized as the |
| 171 | followed by two spaces, unless it's inside some sort of quotes or | 177 | end of a sentence, the ending period, question mark, or exclamation point |
| 172 | parenthesis. See Info node `(elisp)Standard Regexps'." | 178 | must be followed by two spaces, with perhaps some closing delimiters |
| 179 | in between. See Info node `(elisp)Standard Regexps'." | ||
| 173 | (or sentence-end | 180 | (or sentence-end |
| 174 | (concat (if sentence-end-without-period "\\w \\|") | 181 | (concat (if sentence-end-without-period "\\w \\|") |
| 175 | "\\([.?!][]\"'\xd0c9\x5397d)}]*" | 182 | "\\(" |
| 183 | sentence-end-base | ||
| 176 | (if sentence-end-double-space | 184 | (if sentence-end-double-space |
| 177 | "\\($\\| $\\|\t\\| \\)" "\\($\\|[\t ]\\)") | 185 | "\\($\\| $\\|\t\\| \\)" "\\($\\|[\t ]\\)") |
| 178 | "\\|[" sentence-end-without-space "]+\\)" | 186 | "\\|[" sentence-end-without-space "]+" |
| 187 | "\\)" | ||
| 179 | "[ \t\n]*"))) | 188 | "[ \t\n]*"))) |
| 180 | 189 | ||
| 181 | (defcustom page-delimiter "^\014" | 190 | (defcustom page-delimiter "^\014" |