changeset 108662:30ebb77362b6

* textmodes/fill.el (fill-region): Don't fill past the end.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 18 May 2010 23:51:55 -0400
parents 0706b3de1aa0
children a224d29f3386
files lisp/ChangeLog lisp/textmodes/fill.el
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue May 18 16:51:12 2010 -0400
+++ b/lisp/ChangeLog	Tue May 18 23:51:55 2010 -0400
@@ -1,3 +1,7 @@
+2010-05-19  Uday S Reddy  <u.s.reddy@cs.bham.ac.uk>  (tiny change)
+
+	* textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
+
 2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* subr.el (read-quoted-char): Resolve modifiers after key
--- a/lisp/textmodes/fill.el	Tue May 18 16:51:12 2010 -0400
+++ b/lisp/textmodes/fill.el	Tue May 18 23:51:55 2010 -0400
@@ -1036,7 +1036,7 @@
 	  (fill-forward-paragraph -1))
 	(if (< (point) beg)
 	    (goto-char beg))
-	(if (>= (point) initial)
+	(if (and (>= (point) initial) (< (point) end))
 	    (setq fill-pfx
 		  (fill-region-as-paragraph (point) end justify nosqueeze))
 	  (goto-char end))))