diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-10-26 09:32:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-10-26 09:32:04 +0000 |
| commit | a461b8e01ede654e1db9c35fbf69600a355b36d4 (patch) | |
| tree | 6307c56f1449a88462e6ac5a6e8fc67a4a322681 | |
| parent | ed0cae0592ed6eafda6281507bc3faeb2123cf66 (diff) | |
| download | emacs-a461b8e01ede654e1db9c35fbf69600a355b36d4.tar.gz | |
(fill-individual-paragraphs): Avoid infinite loop
if mailp is set and no message was yanked.
| -rw-r--r-- | lisp/textmodes/fill.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 6411ba91ea4..66c0d94e51f 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -358,8 +358,11 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines." (save-excursion (goto-char min) (beginning-of-line) + (narrow-to-region (point) max) (if mailp - (while (or (looking-at "[ \t]*[^ \t\n]*:") (looking-at "[ \t]*$")) + (while (and (not (eobp)) + (or (looking-at "[ \t]*[^ \t\n]*:") + (looking-at "[ \t]*$"))) (if (looking-at "[ \t]*[^ \t\n]*:") (search-forward "\n\n" nil 'move) (forward-line 1)))) |
