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