From 731573d4633945a47f180b12f2cb2b70fa905db3 Mon Sep 17 00:00:00 2001 From: yoichi Date: Mon, 6 Dec 2004 13:05:03 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-forward): Put subject in original message buffer as argument of wl-draft-forward. * wl-draft.el (wl-draft-forward): Decode subject as in wl-draft-reply. --- wl/ChangeLog | 7 +++++++ wl/wl-draft.el | 8 +++++++- wl/wl-summary.el | 11 +++-------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 6fec881..d06646d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2004-12-06 Yoichi NAKAYAMA + + * wl-summary.el (wl-summary-forward): Put subject in original + message buffer as argument of wl-draft-forward. + * wl-draft.el (wl-draft-forward): Decode subject as in + wl-draft-reply. + 2004-12-05 Yoichi NAKAYAMA * wl-fldmgr.el (wl-fldmgr-unsubscribe): Show message if it is not diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 7367f20..5d5e661 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -278,7 +278,13 @@ e.g. (let (references parent-folder subject) (with-current-buffer summary-buf (setq parent-folder (wl-summary-buffer-folder-name))) - (setq subject (wl-draft-forward-make-subject original-subject)) + (with-temp-buffer ; to keep raw buffer unibyte. + (set-buffer-multibyte default-enable-multibyte-characters) + (let ((decoder (mime-find-field-decoder 'Subject 'plain))) + (setq subject (wl-draft-reply-make-subject + (if (and original-subject decoder) + (funcall decoder original-subject) original-subject))))) + (setq subject (wl-draft-forward-make-subject subject)) (with-current-buffer (wl-message-get-original-buffer) (setq references (nconc (std11-field-bodies '("References" "In-Reply-To")) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 167debf..4729e29 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4224,15 +4224,10 @@ Use function list is `wl-summary-write-current-folder-functions'." (wl-summary-redisplay-internal folder number)) (setq mes-buf wl-message-buffer) (wl-message-select-buffer mes-buf) - ;; get original subject. - (if summary-buf - (save-excursion - (set-buffer summary-buf) - (setq subject - (or (elmo-message-entity-field - (elmo-message-entity folder number) 'subject 'decode) - "")))) (set-buffer mes-buf) + (setq subject (with-current-buffer + wl-message-buffer-original-buffer + (std11-field-body "Subject"))) (wl-draft-forward subject summary-buf number) (with-current-buffer summary-buf (run-hooks 'wl-summary-forward-hook)) (unless without-setup-hook -- 1.7.10.4