diff options
| author | Richard M. Stallman | 1996-03-19 20:05:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-03-19 20:05:11 +0000 |
| commit | 253996a89253500b04230f2f577cbc2d9714e470 (patch) | |
| tree | 6680e262c9ccffc204540a645740524b7e60a3a6 | |
| parent | b764619dc8ba58f03b0ff8e8d968774ef07fca3f (diff) | |
| download | emacs-253996a89253500b04230f2f577cbc2d9714e470.tar.gz emacs-253996a89253500b04230f2f577cbc2d9714e470.zip | |
(fill-region-as-paragraph): Fix the second check for
whether we reached the end of the paragraph.
| -rw-r--r-- | lisp/textmodes/fill.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 152ccf96f2a..1ce82773f78 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -321,7 +321,9 @@ space does not end a sentence, so don't break a line there." | |||
| 321 | (forward-char -2) | 321 | (forward-char -2) |
| 322 | (skip-chars-backward "^ \n" linebeg))) | 322 | (skip-chars-backward "^ \n" linebeg))) |
| 323 | ;; If the left margin and fill prefix by themselves | 323 | ;; If the left margin and fill prefix by themselves |
| 324 | ;; pass the fill-column, keep at least one word. | 324 | ;; pass the fill-column. or if they are zero |
| 325 | ;; but we have no room for even one word, | ||
| 326 | ;; keep at least one word anyway. | ||
| 325 | ;; This handles ALL BUT the first line of the paragraph. | 327 | ;; This handles ALL BUT the first line of the paragraph. |
| 326 | (if (if (zerop prefixcol) | 328 | (if (if (zerop prefixcol) |
| 327 | (save-excursion | 329 | (save-excursion |
| @@ -371,7 +373,7 @@ space does not end a sentence, so don't break a line there." | |||
| 371 | (skip-chars-forward "^ \t\n") | 373 | (skip-chars-forward "^ \t\n") |
| 372 | (setq first nil)))) | 374 | (setq first nil)))) |
| 373 | ;; Check again to see if we got to the end of the paragraph. | 375 | ;; Check again to see if we got to the end of the paragraph. |
| 374 | (if (eobp) | 376 | (if (save-excursion (skip-chars-forward " \t") (eobp)) |
| 375 | (or nosqueeze (delete-horizontal-space)) | 377 | (or nosqueeze (delete-horizontal-space)) |
| 376 | ;; Replace whitespace here with one newline, then indent to left | 378 | ;; Replace whitespace here with one newline, then indent to left |
| 377 | ;; margin. | 379 | ;; margin. |