Mercurial > emacs
changeset 13478:391ce1139d50
(mail-yank-clear-headers): Do nothing if
mail-yank-ignored-headers is nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 10 Nov 1995 17:23:49 +0000 |
parents | 5c500f39271c |
children | 983cfcaf1fbd |
files | lisp/mail/sendmail.el |
diffstat | 1 files changed, 14 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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.