changeset 67916:26c863f15f72

(fill-single-word-nobreak-p): Use `sentence-end'.
author Juri Linkov <juri@jurta.org>
date Fri, 30 Dec 2005 05:59:16 +0000
parents 13c47acdfe5c
children 15149da0b974
files lisp/textmodes/fill.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Fri Dec 30 05:58:39 2005 +0000
+++ b/lisp/textmodes/fill.el	Fri Dec 30 05:59:16 2005 +0000
@@ -291,12 +291,13 @@
 
 (defun fill-single-word-nobreak-p ()
   "Don't break a line after the first or before the last word of a sentence."
-  (or (looking-at "[ \t]*\\sw+[ \t]*[.?!:][ \t]*$")
+  (or (looking-at (concat "[ \t]*\\sw+" "\\(?:" (sentence-end) "\\)"))
       (save-excursion
 	(skip-chars-backward " \t")
 	(and (/= (skip-syntax-backward "w") 0)
 	     (/= (skip-chars-backward " \t") 0)
-	     (/= (skip-chars-backward ".?!:") 0)))))
+	     (/= (skip-chars-backward ".?!:") 0)
+	     (looking-at (sentence-end))))))
 
 (defun fill-french-nobreak-p ()
   "Return nil if French style allows breaking the line at point.