aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-10-21 18:56:56 +0000
committerRichard M. Stallman2005-10-21 18:56:56 +0000
commitf4b80eb14c8cd969c80cb68ff9508d9e7011db22 (patch)
treecac270286674b97d2cedc34dde8acdd5ccbb4367
parent5ae158bf21d620f7c0d275e8b9719ad0c6df156a (diff)
downloademacs-f4b80eb14c8cd969c80cb68ff9508d9e7011db22.tar.gz
emacs-f4b80eb14c8cd969c80cb68ff9508d9e7011db22.zip
(sentence-end-base): New variable.
(sentence-end): Use sentence-end-base.
-rw-r--r--lisp/textmodes/paragraphs.el25
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
165This function returns either the value of the variable `sentence-end' 171This function returns either the value of the variable `sentence-end'
166if it is non-nil, or the default value constructed from the 172if it is non-nil, or the default value constructed from the
167variables `sentence-end-double-space', `sentence-end-without-period' 173variables `sentence-end-base', `sentence-end-double-space',
168and `sentence-end-without-space'. The default value specifies 174`sentence-end-without-period' and `sentence-end-without-space'.
169that in order to be recognized as the end of a sentence, the 175
170ending period, question mark, or exclamation point must be 176The default value specifies that in order to be recognized as the
171followed by two spaces, unless it's inside some sort of quotes or 177end of a sentence, the ending period, question mark, or exclamation point
172parenthesis. See Info node `(elisp)Standard Regexps'." 178must be followed by two spaces, with perhaps some closing delimiters
179in 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"