Mercurial > emacs
comparison lisp/textmodes/fill.el @ 50659:f20dbbe44da9
(fill-region-as-paragraph): Fix "last line goes to fill-column+1" problem.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 21 Apr 2003 16:22:08 +0000 |
parents | dff98b69fed2 |
children | 89533dc3e837 |
comparison
equal
deleted
inserted
replaced
50658:94bb873a9f0d | 50659:f20dbbe44da9 |
---|---|
658 ;; This is the actual filling loop. | 658 ;; This is the actual filling loop. |
659 (goto-char from) | 659 (goto-char from) |
660 (let (linebeg) | 660 (let (linebeg) |
661 (while (< (point) to) | 661 (while (< (point) to) |
662 (setq linebeg (point)) | 662 (setq linebeg (point)) |
663 (move-to-column (1+ (current-fill-column))) | 663 (move-to-column (current-fill-column)) |
664 (if (when (< (point) to) | 664 (if (when (< (point) to) |
665 ;; Find the position where we'll break the line. | 665 ;; Find the position where we'll break the line. |
666 (forward-char 1) ;Use an immediately following space, if any. | |
666 (fill-move-to-break-point linebeg) | 667 (fill-move-to-break-point linebeg) |
667 ;; Check again to see if we got to the end of | 668 ;; Check again to see if we got to the end of |
668 ;; the paragraph. | 669 ;; the paragraph. |
669 (skip-chars-forward " \t") | 670 (skip-chars-forward " \t") |
670 (< (point) to)) | 671 (< (point) to)) |