changeset 11282:3da60d3584c4

(fill-region): Avoid error on reaching end of buffer.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Apr 1995 23:44:45 +0000
parents 10f9cf00c770
children 4bfe7ca7e1f9
files lisp/textmodes/fill.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))