From: Juri Linkov Date: Fri, 21 Oct 2005 08:50:28 +0000 (+0000) Subject: (fill-nobreak-p): Fix first two rules to skip backward only X-Git-Tag: emacs-pretest-22.0.90~6433 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=08150aa07e70fa16fe75a8764ffc053ec3224621;p=emacs.git (fill-nobreak-p): Fix first two rules to skip backward only space (instead of space and period) before looking at sentence end. --- diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 11ddfc0e967..ce95c6f026f 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -344,13 +344,14 @@ and `fill-nobreak-invisible'." ;; 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