Commit 08150aa0 authored by Juri Linkov's avatar Juri Linkov
Browse files

(fill-nobreak-p): Fix first two rules to skip backward only

space (instead of space and period) before looking at sentence end.
parent 05d36154
...@@ -344,13 +344,14 @@ and `fill-nobreak-invisible'." ...@@ -344,13 +344,14 @@ and `fill-nobreak-invisible'."
;; it at the end of the line. ;; it at the end of the line.
(and sentence-end-double-space (and sentence-end-double-space
(save-excursion (save-excursion
(skip-chars-backward ". ") (skip-chars-backward " ")
(looking-at "\\. \\([^ ]\\|$\\)"))) (and (eq (preceding-char) ?.)
(looking-at " \\([^ ]\\|$\\)"))))
;; Another approach to the same problem. ;; Another approach to the same problem.
(save-excursion (save-excursion
(skip-chars-backward ". ") (skip-chars-backward " ")
(and (looking-at "\\.") (and (eq (preceding-char) ?.)
(not (looking-at (sentence-end))))) (not (progn (forward-char -1) (looking-at (sentence-end))))))
;; Don't split a line if the rest would look like a new paragraph. ;; Don't split a line if the rest would look like a new paragraph.
(unless use-hard-newlines (unless use-hard-newlines
(save-excursion (save-excursion
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment