aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/sendmail.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index b6146371b56..a6dbc481ae5 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -893,19 +893,20 @@ and don't delete any header fields."
893 (if (not (eolp)) (insert ?\n))))) 893 (if (not (eolp)) (insert ?\n)))))
894 894
895(defun mail-yank-clear-headers (start end) 895(defun mail-yank-clear-headers (start end)
896 (save-excursion 896 (if mail-yank-ignored-headers
897 (goto-char start) 897 (save-excursion
898 (if (search-forward "\n\n" end t) 898 (goto-char start)
899 (save-restriction 899 (if (search-forward "\n\n" end t)
900 (narrow-to-region start (point)) 900 (save-restriction
901 (goto-char start) 901 (narrow-to-region start (point))
902 (while (let ((case-fold-search t)) 902 (goto-char start)
903 (re-search-forward mail-yank-ignored-headers nil t)) 903 (while (let ((case-fold-search t))
904 (beginning-of-line) 904 (re-search-forward mail-yank-ignored-headers nil t))
905 (delete-region (point) 905 (beginning-of-line)
906 (progn (re-search-forward "\n[^ \t]") 906 (delete-region (point)
907 (forward-char -1) 907 (progn (re-search-forward "\n[^ \t]")
908 (point)))))))) 908 (forward-char -1)
909 (point)))))))))
909 910
910;; Put these last, to reduce chance of lossage from quitting in middle of loading the file. 911;; Put these last, to reduce chance of lossage from quitting in middle of loading the file.
911 912