comparison lisp/textmodes/fill.el @ 40633:9e19d0344da5

(fill-region-as-paragraph): Don't forget to skip over current whitespace before looking for a preceding space.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 02 Nov 2001 03:10:31 +0000
parents b5f06f88b686
children 56aa9e5dc60c
comparison
equal deleted inserted replaced
40632:39fc5111667c 40633:9e19d0344da5
563 ;; Move back to the previous place to break. 563 ;; Move back to the previous place to break.
564 ;; The reason is that if a period ends up at the end of a line, 564 ;; The reason is that if a period ends up at the end of a line,
565 ;; further fills will assume it ends a sentence. 565 ;; further fills will assume it ends a sentence.
566 ;; If we now know it does not end a sentence, 566 ;; If we now know it does not end a sentence,
567 ;; avoid putting it at the end of the line. 567 ;; avoid putting it at the end of the line.
568 (while (and (> (point) linebeg) (fill-nobreak-p)) 568 (while (and (> (point) linebeg)
569 (fill-nobreak-p)
570 (skip-chars-backward " \t"))
569 (if (re-search-backward " \\|\\c|.\\|.\\c|" linebeg 0) 571 (if (re-search-backward " \\|\\c|.\\|.\\c|" linebeg 0)
570 (forward-char 1))) 572 (forward-char 1)))
571 ;; If the left margin and fill prefix by themselves 573 ;; If the left margin and fill prefix by themselves
572 ;; pass the fill-column. or if they are zero 574 ;; pass the fill-column. or if they are zero
573 ;; but we have no room for even one word, 575 ;; but we have no room for even one word,