Commit c97a5db4 authored by Karl Heuer's avatar Karl Heuer
Browse files

(fill-individual-paragraphs): Before deleting

the inserted newline, verify that one was really inserted.
parent 70f4a594
...@@ -1055,7 +1055,8 @@ Also, if CITATION-REGEXP is non-nil, don't fill header lines." ...@@ -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. ;; Fill this paragraph, but don't add a newline at the end.
(let ((had-newline (bolp))) (let ((had-newline (bolp)))
(fill-region-as-paragraph start (point) justify) (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) (defun fill-individual-paragraphs-prefix (citation-regexp)
(or (let ((adaptive-fill-first-line-regexp "") (or (let ((adaptive-fill-first-line-regexp "")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment