]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/fill.el
Cleanup intervals.
[gnu-emacs] / lisp / textmodes / fill.el
index d3fa49491d42b17754194d11b570e543a3511f02..d0e90c99516806bcccc7accc88151471b668f17d 100644 (file)
@@ -93,6 +93,7 @@ reinserts the fill prefix in each resulting line."
   ;; Added `!' for doxygen comments starting with `//!' or `/*!'.
   ;; Added `%' for TeX comments.
   ;; RMS: deleted the code to match `1.' and `(1)'.
+  ;; Update mail-mode's paragraph-separate if you change this.
   (purecopy "[ \t]*\\([-–!|#%;>*·•‣⁃◦]+[ \t]*\\)*")
   "Regexp to match text at start of line that constitutes indentation.
 If Adaptive Fill mode is enabled, a prefix matching this pattern
@@ -1010,7 +1011,8 @@ space does not end a sentence, so don't break a line there."
                       (if current-prefix-arg 'full))))
   (unless (memq justify '(t nil none full center left right))
     (setq justify 'full))
-  (let (max beg fill-pfx)
+  (let ((start-point (point-marker))
+       max beg fill-pfx)
     (goto-char (max from to))
     (when to-eop
       (skip-chars-backward "\n")
@@ -1041,6 +1043,8 @@ space does not end a sentence, so don't break a line there."
            (setq fill-pfx
                  (fill-region-as-paragraph (point) end justify nosqueeze))
          (goto-char end))))
+    (goto-char start-point)
+    (set-marker start-point nil)
     fill-pfx))
 
 \f