# HG changeset patch # User Juri Linkov # Date 1129884628 0 # Node ID 843776c843bf9c5fbc96c6138871f53b30d8a52c # Parent c12719e4ec89728d8f5faa223c9ea3639e98acb3 (fill-nobreak-p): Fix first two rules to skip backward only space (instead of space and period) before looking at sentence end. diff -r c12719e4ec89 -r 843776c843bf lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Fri Oct 21 08:49:46 2005 +0000 +++ b/lisp/textmodes/fill.el Fri Oct 21 08:50:28 2005 +0000 @@ -344,13 +344,14 @@ ;; it at the end of the line. (and sentence-end-double-space (save-excursion - (skip-chars-backward ". ") - (looking-at "\\. \\([^ ]\\|$\\)"))) + (skip-chars-backward " ") + (and (eq (preceding-char) ?.) + (looking-at " \\([^ ]\\|$\\)")))) ;; Another approach to the same problem. (save-excursion - (skip-chars-backward ". ") - (and (looking-at "\\.") - (not (looking-at (sentence-end))))) + (skip-chars-backward " ") + (and (eq (preceding-char) ?.) + (not (progn (forward-char -1) (looking-at (sentence-end)))))) ;; Don't split a line if the rest would look like a new paragraph. (unless use-hard-newlines (save-excursion