aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2005-10-21 08:50:28 +0000
committerJuri Linkov2005-10-21 08:50:28 +0000
commit08150aa07e70fa16fe75a8764ffc053ec3224621 (patch)
tree704922939043fc45f4a070f7d1df9a796c9ded64
parent05d36154bf35dbd15f29c4f754531da799ffdd12 (diff)
downloademacs-08150aa07e70fa16fe75a8764ffc053ec3224621.tar.gz
emacs-08150aa07e70fa16fe75a8764ffc053ec3224621.zip
(fill-nobreak-p): Fix first two rules to skip backward only
space (instead of space and period) before looking at sentence end.
-rw-r--r--lisp/textmodes/fill.el11
1 files changed, 6 insertions, 5 deletions
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'."
344 ;; it at the end of the line. 344 ;; it at the end of the line.
345 (and sentence-end-double-space 345 (and sentence-end-double-space
346 (save-excursion 346 (save-excursion
347 (skip-chars-backward ". ") 347 (skip-chars-backward " ")
348 (looking-at "\\. \\([^ ]\\|$\\)"))) 348 (and (eq (preceding-char) ?.)
349 (looking-at " \\([^ ]\\|$\\)"))))
349 ;; Another approach to the same problem. 350 ;; Another approach to the same problem.
350 (save-excursion 351 (save-excursion
351 (skip-chars-backward ". ") 352 (skip-chars-backward " ")
352 (and (looking-at "\\.") 353 (and (eq (preceding-char) ?.)
353 (not (looking-at (sentence-end))))) 354 (not (progn (forward-char -1) (looking-at (sentence-end))))))
354 ;; Don't split a line if the rest would look like a new paragraph. 355 ;; Don't split a line if the rest would look like a new paragraph.
355 (unless use-hard-newlines 356 (unless use-hard-newlines
356 (save-excursion 357 (save-excursion