diff options
Diffstat (limited to 'lisp/textmodes/fill.el')
-rw-r--r-- | lisp/textmodes/fill.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 3346c551d93..6681b03913c 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -743,9 +743,16 @@ space does not end a sentence, so don't break a line there." ;; This is the actual filling loop. (goto-char from) - (let (linebeg) + (let ((first t) + linebeg) (while (< (point) to) - (setq linebeg (point)) + ;; On the first line, there may be text in the fill prefix + ;; zone. In that case, don't consider that area when + ;; trying to find a place to put a line break (bug#45720). + (if (not first) + (setq linebeg (point)) + (setq first nil + linebeg (+ (point) (length fill-prefix)))) (move-to-column (current-fill-column)) (if (when (< (point) to) ;; Find the position where we'll break the line. |