From c97a5db406f6993d1cf633be8d17356a2f595b9f Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 4 Sep 1998 20:37:22 +0000 Subject: [PATCH] (fill-individual-paragraphs): Before deleting the inserted newline, verify that one was really inserted. --- lisp/textmodes/fill.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 0886ecfb152..a4b515c0b65 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1055,7 +1055,8 @@ Also, if CITATION-REGEXP is non-nil, don't fill header lines." ;; Fill this paragraph, but don't add a newline at the end. (let ((had-newline (bolp))) (fill-region-as-paragraph start (point) justify) - (or had-newline (delete-char -1)))))))) + (if (and (bolp) (not had-newline)) + (delete-char -1)))))))) (defun fill-individual-paragraphs-prefix (citation-regexp) (or (let ((adaptive-fill-first-line-regexp "") -- 2.39.2