From: Stefan Monnier Date: Fri, 12 Apr 2002 02:56:29 +0000 (+0000) Subject: (fill-region-as-paragraph): Use save-excursion instead of relying on X-Git-Tag: ttn-vms-21-2-B4~15684 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=79424eea3da926b1fdf361d09ef77354dcddd10a;p=emacs.git (fill-region-as-paragraph): Use save-excursion instead of relying on forward-line to bring us where we started. --- diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 5a39ba4d8b1..af491603fc8 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -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)