Commit 42457d75 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(fill-region): Avoid error on reaching end of buffer.

parent 8cf19007
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment