aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-26 09:32:04 +0000
committerRichard M. Stallman1994-10-26 09:32:04 +0000
commita461b8e01ede654e1db9c35fbf69600a355b36d4 (patch)
tree6307c56f1449a88462e6ac5a6e8fc67a4a322681
parented0cae0592ed6eafda6281507bc3faeb2123cf66 (diff)
downloademacs-a461b8e01ede654e1db9c35fbf69600a355b36d4.tar.gz
emacs-a461b8e01ede654e1db9c35fbf69600a355b36d4.zip
(fill-individual-paragraphs): Avoid infinite loop
if mailp is set and no message was yanked.
-rw-r--r--lisp/textmodes/fill.el5
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."
358 (save-excursion 358 (save-excursion
359 (goto-char min) 359 (goto-char min)
360 (beginning-of-line) 360 (beginning-of-line)
361 (narrow-to-region (point) max)
361 (if mailp 362 (if mailp
362 (while (or (looking-at "[ \t]*[^ \t\n]*:") (looking-at "[ \t]*$")) 363 (while (and (not (eobp))
364 (or (looking-at "[ \t]*[^ \t\n]*:")
365 (looking-at "[ \t]*$")))
363 (if (looking-at "[ \t]*[^ \t\n]*:") 366 (if (looking-at "[ \t]*[^ \t\n]*:")
364 (search-forward "\n\n" nil 'move) 367 (search-forward "\n\n" nil 'move)
365 (forward-line 1)))) 368 (forward-line 1))))