diff options
| author | Richard M. Stallman | 1995-04-07 23:44:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-07 23:44:45 +0000 |
| commit | 42457d75fc8fefffb203344cec5fe5e9051d4992 (patch) | |
| tree | 6b9b328f8a8bf2098ed86394597527705306186e | |
| parent | 8cf19007fd7243731639303d140e668ab8bb9500 (diff) | |
| download | emacs-42457d75fc8fefffb203344cec5fe5e9051d4992.tar.gz emacs-42457d75fc8fefffb203344cec5fe5e9051d4992.zip | |
(fill-region): Avoid error on reaching end of buffer.
| -rw-r--r-- | lisp/textmodes/fill.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 7571ab5cf4c..656c99f725b 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -402,7 +402,7 @@ space does not end a sentence, so don't break a line there." | |||
| 402 | (not (= ?\n (char-after end))) | 402 | (not (= ?\n (char-after end))) |
| 403 | (not (= end (point-max)))) | 403 | (not (= end (point-max)))) |
| 404 | (goto-char (1+ end))) | 404 | (goto-char (1+ end))) |
| 405 | (setq end (min (point-max) (1+ end))) | 405 | (setq end (if end (min (point-max) (1+ end)) (point-max))) |
| 406 | (goto-char initial)) | 406 | (goto-char initial)) |
| 407 | (forward-paragraph 1) | 407 | (forward-paragraph 1) |
| 408 | (setq end (point)) | 408 | (setq end (point)) |