# HG changeset patch # User Richard M. Stallman # Date 797298285 0 # Node ID 3da60d3584c49a13407ee3299bf3efc7c5c15bfb # Parent 10f9cf00c77086ad56587614613996af26d9a463 (fill-region): Avoid error on reaching end of buffer. diff -r 10f9cf00c770 -r 3da60d3584c4 lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Fri Apr 07 23:44:31 1995 +0000 +++ b/lisp/textmodes/fill.el Fri Apr 07 23:44:45 1995 +0000 @@ -402,7 +402,7 @@ (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))