]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-region-as-paragraph): Use save-excursion instead of relying on
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Apr 2002 02:56:29 +0000 (02:56 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Apr 2002 02:56:29 +0000 (02:56 +0000)
forward-line to bring us where we started.

lisp/textmodes/fill.el

index 5a39ba4d8b11c27b6e780b7883154aa37af0f3be..af491603fc892984fb54297af7be4c7e38ee038d 100644 (file)
@@ -660,9 +660,9 @@ space does not end a sentence, so don't break a line there."
                      (progn
                        (delete-horizontal-space)
                        (justify-current-line justify t t))
-                   (forward-line -1)
-                   (justify-current-line justify nil t)
-                   (forward-line 1))))))
+                   (save-excursion
+                     (forward-line -1)
+                     (justify-current-line justify nil t)))))))
        ;; Leave point after final newline.
        (goto-char to))
       (unless (eobp)