From 79424eea3da926b1fdf361d09ef77354dcddd10a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 12 Apr 2002 02:56:29 +0000 Subject: [PATCH] (fill-region-as-paragraph): Use save-excursion instead of relying on forward-line to bring us where we started. --- lisp/textmodes/fill.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.39.2