]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-region): Avoid error on reaching end of buffer.
authorRichard M. Stallman <rms@gnu.org>
Fri, 7 Apr 1995 23:44:45 +0000 (23:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 7 Apr 1995 23:44:45 +0000 (23:44 +0000)
lisp/textmodes/fill.el

index 7571ab5cf4c85f39a8bba56697c665086e9a0aec..656c99f725b5fa28d4dff7ec69f0355b4c88cb47 100644 (file)
@@ -402,7 +402,7 @@ space does not end a sentence, so don't break a line there."
                            (not (= ?\n (char-after end)))
                            (not (= end (point-max))))
                  (goto-char (1+ end)))
-               (setq end (min (point-max) (1+ end)))
+               (setq end (if end (min (point-max) (1+ end)) (point-max)))
                (goto-char initial))
            (forward-paragraph 1)
            (setq end (point))