changeset 50411:62a57aa6353a

(fill-newline): Don't leave markers before the prefix.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 03 Apr 2003 00:53:49 +0000
parents fff8e0eb547c
children 49cba7ce673a
files lisp/textmodes/fill.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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'."