* wl-vars.el (wl-ignored-forwarded-headers): New user option.
authoryamaoka <yamaoka>
Fri, 21 Apr 2000 00:43:11 +0000 (00:43 +0000)
committeryamaoka <yamaoka>
Fri, 21 Apr 2000 00:43:11 +0000 (00:43 +0000)
* 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
wl/wl-draft.el
wl/wl-vars.el

index 2372630..a8eefea 100644 (file)
@@ -1,3 +1,12 @@
+2000-04-20  Katsumi Yamaoka    <yamaoka@jpl.org>
+
+       * 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  <teranisi@gohome.org>
 
        * wl-mime.el (wl-message-request-partial):
index b85bfc7..e84b5b1 100644 (file)
@@ -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 
index 2c9637a..d5bf1c8 100644 (file)
@@ -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