aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-04-12 02:56:29 +0000
committerStefan Monnier2002-04-12 02:56:29 +0000
commit79424eea3da926b1fdf361d09ef77354dcddd10a (patch)
treeeaff96e945bd93656f42164744d9cbfed18cd400
parent4599773d96f8d587d2026ebb96865105e16743fc (diff)
downloademacs-79424eea3da926b1fdf361d09ef77354dcddd10a.tar.gz
emacs-79424eea3da926b1fdf361d09ef77354dcddd10a.zip
(fill-region-as-paragraph): Use save-excursion instead of relying on
forward-line to bring us where we started.
-rw-r--r--lisp/textmodes/fill.el6
1 files 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."
660 (progn 660 (progn
661 (delete-horizontal-space) 661 (delete-horizontal-space)
662 (justify-current-line justify t t)) 662 (justify-current-line justify t t))
663 (forward-line -1) 663 (save-excursion
664 (justify-current-line justify nil t) 664 (forward-line -1)
665 (forward-line 1)))))) 665 (justify-current-line justify nil t)))))))
666 ;; Leave point after final newline. 666 ;; Leave point after final newline.
667 (goto-char to)) 667 (goto-char to))
668 (unless (eobp) 668 (unless (eobp)