aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-05-18 23:51:55 -0400
committerStefan Monnier2010-05-18 23:51:55 -0400
commitab0c07c0209012ff0010c2c24303ee7a4c33a514 (patch)
tree267f81ca318782abc9012bf9edb175d78babea0a
parent29031d52feb109fa43ad08c4451713face97eb85 (diff)
downloademacs-ab0c07c0209012ff0010c2c24303ee7a4c33a514.tar.gz
emacs-ab0c07c0209012ff0010c2c24303ee7a4c33a514.zip
* textmodes/fill.el (fill-region): Don't fill past the end.
Fixes: debbugs:6201
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/fill.el2
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1da680a68f9..3346fcf497a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12010-05-19 Uday S Reddy <u.s.reddy@cs.bham.ac.uk> (tiny change)
2
3 * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
4
12010-05-18 Stefan Monnier <monnier@iro.umontreal.ca> 52010-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * subr.el (read-quoted-char): Resolve modifiers after key 7 * subr.el (read-quoted-char): Resolve modifiers after key
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 1b3cc8dc4d8..da6e02bfa2f 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -1036,7 +1036,7 @@ space does not end a sentence, so don't break a line there."
1036 (fill-forward-paragraph -1)) 1036 (fill-forward-paragraph -1))
1037 (if (< (point) beg) 1037 (if (< (point) beg)
1038 (goto-char beg)) 1038 (goto-char beg))
1039 (if (>= (point) initial) 1039 (if (and (>= (point) initial) (< (point) end))
1040 (setq fill-pfx 1040 (setq fill-pfx
1041 (fill-region-as-paragraph (point) end justify nosqueeze)) 1041 (fill-region-as-paragraph (point) end justify nosqueeze))
1042 (goto-char end)))) 1042 (goto-char end))))