# HG changeset patch # User Stefan Monnier # Date 1049331229 0 # Node ID 62a57aa6353a094791ef08a260d4d98a38b45ad8 # Parent fff8e0eb547cc3a7e6934c891356e718e3bb43e1 (fill-newline): Don't leave markers before the prefix. diff -r fff8e0eb547c -r 62a57aa6353a lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Wed Apr 02 23:57:17 2003 +0000 +++ b/lisp/textmodes/fill.el Thu Apr 03 00:53:49 2003 +0000 @@ -523,7 +523,7 @@ ;; 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 @@ (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'."