# HG changeset patch # User Juri Linkov # Date 1135922356 0 # Node ID 26c863f15f72976192f38a039ee625d4ef3bcda2 # Parent 13c47acdfe5c73387a56abae5149cb3174f765d1 (fill-single-word-nobreak-p): Use `sentence-end'. diff -r 13c47acdfe5c -r 26c863f15f72 lisp/textmodes/fill.el --- 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.