# HG changeset patch # User Richard M. Stallman # Date 816024229 0 # Node ID 391ce1139d504cf24bb9c0ca7eacf31a15cfcfbe # Parent 5c500f39271cd8690cf0aa759052617eea8a01d7 (mail-yank-clear-headers): Do nothing if mail-yank-ignored-headers is nil. diff -r 5c500f39271c -r 391ce1139d50 lisp/mail/sendmail.el --- a/lisp/mail/sendmail.el Fri Nov 10 17:21:30 1995 +0000 +++ b/lisp/mail/sendmail.el Fri Nov 10 17:23:49 1995 +0000 @@ -893,19 +893,20 @@ (if (not (eolp)) (insert ?\n))))) (defun mail-yank-clear-headers (start end) - (save-excursion - (goto-char start) - (if (search-forward "\n\n" end t) - (save-restriction - (narrow-to-region start (point)) - (goto-char start) - (while (let ((case-fold-search t)) - (re-search-forward mail-yank-ignored-headers nil t)) - (beginning-of-line) - (delete-region (point) - (progn (re-search-forward "\n[^ \t]") - (forward-char -1) - (point)))))))) + (if mail-yank-ignored-headers + (save-excursion + (goto-char start) + (if (search-forward "\n\n" end t) + (save-restriction + (narrow-to-region start (point)) + (goto-char start) + (while (let ((case-fold-search t)) + (re-search-forward mail-yank-ignored-headers nil t)) + (beginning-of-line) + (delete-region (point) + (progn (re-search-forward "\n[^ \t]") + (forward-char -1) + (point))))))))) ;; Put these last, to reduce chance of lossage from quitting in middle of loading the file.