2001-06-13 Yuuichi Teranishi <teranisi@gohome.org>
+ * 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.
(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)
(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
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)))
(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)
(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)
(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))
(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)