From a9136b3769b7785db3d73ac3f170d37256311fc6 Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 13 Jun 2001 08:40:01 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-resend-message): Fixed. * wl-draft.el (wl-draft-edit-string): Fetch From: field value and Call wl-draft with `from' argument if its address is included in `wl-user-mail-address-list'. (wl-draft): Added `from' argument. --- wl/ChangeLog | 7 +++++++ wl/wl-draft.el | 23 +++++++++++++++-------- wl/wl-summary.el | 5 ++--- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 070d728..b297588 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,12 @@ 2001-06-13 Yuuichi Teranishi + * wl-summary.el (wl-summary-resend-message): Fixed. + + * wl-draft.el (wl-draft-edit-string): Fetch From: field value and + Call wl-draft with `from' argument if its address is included in + `wl-user-mail-address-list'. + (wl-draft): Added `from' argument. + * wl.el (wl-exit): Delete current frame if wl-folder-use-frame is non-nil. (wl): Don't show demo if wl-demo is nil. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index c49af3a..7a3f01a 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -489,9 +489,8 @@ Reply to author if WITH-ARG is non-nil." (let ((cur-buf (current-buffer)) (tmp-buf (get-buffer-create " *wl-draft-edit-string*")) to subject in-reply-to cc references newsgroups mail-followup-to - content-type content-transfer-encoding - body-beg buffer-read-only - ) + content-type content-transfer-encoding from + body-beg buffer-read-only) (set-buffer tmp-buf) (erase-buffer) (insert string) @@ -507,6 +506,12 @@ Reply to author if WITH-ARG is non-nil." (decode-mime-charset-string subject wl-mime-charset)))) + (setq from (std11-field-body "From") + from (and from + (eword-decode-string + (decode-mime-charset-string + from + wl-mime-charset)))) (setq in-reply-to (std11-field-body "In-Reply-To")) (setq cc (std11-field-body "Cc")) (setq cc (and cc @@ -528,8 +533,10 @@ Reply to author if WITH-ARG is non-nil." mail-followup-to content-type content-transfer-encoding (buffer-substring (point) (point-max)) - 'edit-again - )) + 'edit-again nil + (if (member (nth 1 (std11-extract-address-components from)) + wl-user-mail-address-list) + from))) (and to (mail-position-on-field "To")) (delete-other-windows) (kill-buffer tmp-buf))) @@ -1284,7 +1291,7 @@ If optional argument is non-nil, current draft buffer is killed" (defun wl-draft (&optional to subject in-reply-to cc references newsgroups mail-followup-to content-type content-transfer-encoding - body edit-again summary-buf) + body edit-again summary-buf from) "Write and send mail/news message with Wanderlust." (interactive) (unless (featurep 'wl) @@ -1324,8 +1331,8 @@ If optional argument is non-nil, current draft buffer is killed" (auto-save-mode -1) (wl-draft-mode) (setq wl-sent-message-via nil) - (if (stringp wl-from) - (insert "From: " wl-from "\n")) + (if (stringp (or from wl-from)) + (insert "From: " (or from wl-from) "\n")) (and (or (interactive-p) (eq this-command 'wl-summary-write) to) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index a6cb532..33e8a46 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -643,8 +643,7 @@ you." (message "No address specified.") (message "Resending message to %s..." address) (save-excursion - (let ((mmelmo-force-fetch-entire-message t)) - (wl-summary-set-message-buffer-or-redisplay) + (let ((original (wl-summary-get-original-buffer))) ;; We first set up a normal mail buffer. (set-buffer (get-buffer-create " *wl-draft-resend*")) (buffer-disable-undo (current-buffer)) @@ -664,7 +663,7 @@ you." (delete-region (point) (point-max)) (let ((beg (point))) ;; Insert the message to be resent. - (insert-buffer-substring (wl-message-get-original-buffer)) + (insert-buffer-substring original) (goto-char (point-min)) (search-forward "\n\n") (forward-char -1) -- 1.7.10.4