From 29c1653c7a3764a712b568af8e5a845fc057466d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 3 Apr 2003 00:53:49 +0000 Subject: [PATCH] (fill-newline): Don't leave markers before the prefix. --- lisp/textmodes/fill.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 21f38a97a0d..cce52b0d60b 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -523,7 +523,7 @@ The break position will be always after LINEBEG and generally before point." ;; We need one space at end of line so that ;; further filling won't delete it. NOTE: We ;; intentionally leave this one space to - ;; distingush the case that user wants to put + ;; distinguish the case that user wants to put ;; space between \c| characters. (forward-char 1)) (insert ?\n) @@ -540,9 +540,10 @@ The break position will be always after LINEBEG and generally before point." (fill-indent-to-left-margin) (indent-according-to-mode)) ;; Insert the fill prefix after indentation. - ;; Set prefixcol so whitespace in the prefix won't get lost. (and fill-prefix (not (equal fill-prefix "")) - (insert-and-inherit fill-prefix))) + ;; Markers that were after the whitespace are now at point: insert + ;; before them so they don't get stuck before the prefix. + (insert-before-markers-and-inherit fill-prefix))) (defun fill-indent-to-left-margin () "Indent current line to the column given by `current-left-margin'." -- 2.39.2