You can refer its value in `wl-draft-config-alist'.
e.g.
-(setq wl-draft-config-alist
+\(setq wl-draft-config-alist
'(((string-match \".*@domain1$\" wl-draft-parent-folder)
(\"From\" . \"user@domain1\"))
((string-match \".*@domain2$\" wl-draft-parent-folder)
content-type content-transfer-encoding
(buffer-substring (point) (point-max))
'edit-again))
- (and to (mail-position-on-field "To"))
- (kill-buffer tmp-buf)))
- (run-hooks 'wl-draft-reedit-hook))
+ (kill-buffer tmp-buf))
+ ;; Set cursor point to the top.
+ (goto-char (point-min))
+ (search-forward (concat mail-header-separator "\n") nil t)
+ (run-hooks 'wl-draft-reedit-hook)
+ (and to (mail-position-on-field "To"))))
(defun wl-draft-insert-current-message (dummy)
(interactive)
(let* ((draft-folder (wl-folder-get-elmo-folder wl-draft-folder))
(parent-folder (or parent-folder (wl-summary-buffer-folder-name)))
(summary-buf (wl-summary-get-buffer parent-folder))
- buf-name file-name num change-major-mode-hook
- (reply-or-forward (or (eq this-command 'wl-summary-reply)
- (eq this-command 'wl-summary-forward)
- (eq this-command 'wl-summary-target-mark-forward)
- (eq this-command 'wl-summary-target-mark-reply-with-citation))))
+ (reply-or-forward
+ (or (eq this-command 'wl-summary-reply)
+ (eq this-command 'wl-summary-forward)
+ (eq this-command 'wl-summary-target-mark-forward)
+ (eq this-command 'wl-summary-target-mark-reply-with-citation)))
+ buf-name file-name num change-major-mode-hook)
(if (not (elmo-folder-message-file-p draft-folder))
(error "%s folder cannot be used for draft folder" wl-draft-folder))
(setq num (elmo-max-of-list
(error "Invalid value for wl-draft-reply-buffer-style"))))
(case wl-draft-buffer-style
(split
- (when (and (eq major-mode 'wl-summary-mode)
- wl-message-buffer
- (buffer-live-p wl-message-buffer)
- (get-buffer-window wl-message-buffer))
- (delete-window (get-buffer-window wl-message-buffer)))
+ (when (eq major-mode 'wl-summary-mode)
+ (wl-summary-toggle-disp-msg 'off))
(split-window-vertically)
(other-window 1)
(switch-to-buffer buf-name))
(error "wl-draft-create-header must be use in wl-draft-mode."))
(let (change-major-mode-hook)
(wl-draft-editor-mode)
- (add-hook 'local-write-file-hooks 'wl-draft-save)
+ (when wl-draft-write-file-function
+ (add-hook 'local-write-file-hooks wl-draft-write-file-function))
(wl-draft-overload-functions)
(wl-highlight-headers 'for-draft)
(wl-draft-save)
(progn
(insert mail-header-separator "\n")
(1- (point)))
- 'category 'mail-header-separator)))
+ 'category 'mail-header-separator)
+ (point)))
;;;;;;;;;;;;;;;;
(setq local-variables (cdr local-variables)))
(current-buffer))))
+(defun wl-draft-remove-text-plain-tag ()
+ "Remove text/plain tag of mime-edit."
+ (if (looking-at "^--\\[\\[text/plain\\]\\]$")
+ (delete-region (point-at-bol)(1+ (point-at-eol)))))
+
(defun wl-draft-reedit (number)
(let ((draft-folder (wl-folder-get-elmo-folder wl-draft-folder))
(wl-draft-reedit t)
- buffer file-name change-major-mode-hook)
+ buffer file-name change-major-mode-hook body-top)
(setq file-name (elmo-message-file-name draft-folder number))
(unless (file-exists-p file-name)
(error "File %s does not exist" file-name))
(delete-other-windows)
(switch-to-buffer buffer))
(t (if (functionp wl-draft-buffer-style)
- (funcall wl-draft-buffer-style buf-name)
+ (funcall wl-draft-buffer-style buffer)
(error "Invalid value for wl-draft-buffer-style")))))
(set-buffer buffer)
(insert-file-contents-as-binary file-name)
(let((mime-edit-again-ignored-field-regexp
"^\\(Content-.*\\|Mime-Version\\):"))
(wl-draft-decode-message-in-buffer))
- (wl-draft-insert-mail-header-separator)
+ (setq body-top (wl-draft-insert-mail-header-separator))
(if (not (string-match (regexp-quote wl-draft-folder)
(buffer-name)))
(rename-buffer (concat wl-draft-folder "/" (buffer-name))))
(goto-char (point-min))
(wl-draft-overload-functions)
(wl-draft-editor-mode)
- (add-hook 'local-write-file-hooks 'wl-draft-save)
+ (when wl-draft-write-file-function
+ (add-hook 'local-write-file-hooks wl-draft-write-file-function))
(wl-highlight-headers 'for-draft)
+ (goto-char body-top)
(run-hooks 'wl-draft-reedit-hook)
(goto-char (point-max))
buffer)))
(unless (featurep 'wl)
(require 'wl))
+ (or switch-function
+ (setq switch-function 'keep))
;; protect these -- to and subject get bound at some point, so it looks
;; to be necessary to protect the values used w/in
(let ((wl-user-agent-headers-and-body-alist other-headers)