summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-11-10 17:23:49 +0000
committerRichard M. Stallman <rms@gnu.org>1995-11-10 17:23:49 +0000
commit2b3a206d69bbbf3c1209b79cd35fb52f57cbf397 (patch)
tree60248d61a2ca06a7fa123cc2ec518cae278c95f9
parent6c714afe4fb86d63bc5cb80a6529dccd30a616d9 (diff)
downloademacs-2b3a206d69bbbf3c1209b79cd35fb52f57cbf397.tar.gz
(mail-yank-clear-headers): Do nothing if
mail-yank-ignored-headers is nil.
-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."
(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.