From 638b6c80e261a5e588502d0cf95f36e6e1aca7b7 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 21 Apr 2000 00:43:11 +0000 Subject: [PATCH] * wl-vars.el (wl-ignored-forwarded-headers): New user option. * wl-draft.el (wl-draft-insert-current-message): Delete useless fields from the forwarding message. (wl-draft-yank-from-mail-reply-buffer): Allow the optional argument `ignored-fields'. --- wl/ChangeLog | 9 +++++++++ wl/wl-draft.el | 9 +++++++-- wl/wl-vars.el | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 2372630..a8eefea 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2000-04-20 Katsumi Yamaoka + + * wl-vars.el (wl-ignored-forwarded-headers): New user option. + + * wl-draft.el (wl-draft-insert-current-message): Delete useless + fields from the forwarding message. + (wl-draft-yank-from-mail-reply-buffer): Allow the optional argument + `ignored-fields'. + 2000-04-20 Yuuichi Teranishi * wl-mime.el (wl-message-request-partial): diff --git a/wl/wl-draft.el b/wl/wl-draft.el index b85bfc7..e84b5b1 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -388,7 +388,8 @@ the `wl-smtp-features' variable." (setq wl-draft-reply-buffer buf)) (run-hooks 'wl-reply-hook)) -(defun wl-draft-yank-from-mail-reply-buffer (decode-it) +(defun wl-draft-yank-from-mail-reply-buffer (decode-it + &optional ignored-fields) (interactive) (save-restriction (current-buffer) @@ -401,6 +402,9 @@ the `wl-smtp-features' variable." wl-mime-charset)) (buffer-substring-no-properties (point-min) (point-max)))) + (when ignored-fields + (goto-char (point-min)) + (wl-draft-delete-fields ignored-fields)) (goto-char (point-max)) (push-mark) (goto-char (point-min))) @@ -502,7 +506,8 @@ the `wl-smtp-features' variable." (set-buffer mail-reply-buffer) (buffer-size))) (error "No current message") - (wl-draft-yank-from-mail-reply-buffer nil)))) + (wl-draft-yank-from-mail-reply-buffer nil + wl-ignored-forwarded-headers)))) (defun wl-draft-insert-get-message (dummy) (let ((fld (completing-read diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 2c9637a..d5bf1c8 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1145,6 +1145,11 @@ might set this variable to '(\"-f\" \"you@some.where\")." :type 'regexp :group 'wl-draft) +(defcustom wl-ignored-forwarded-headers "\\(received\\|return-path\\|x-uidl\\)" + "*All headers that match this regexp will be deleted when forwarding a message." + :type 'regexp + :group 'wl-draft) + (defcustom wl-ignored-resent-headers "\\(return-receipt\\|[bdf]cc\\)" "*All headers that match this regexp will be deleted when resending a message." :type 'regexp -- 1.7.10.4