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)
- (\"From\" . \"user@domain2\"))))")
+ (\"From\" . \"user@domain1\"))
+ ((string-match \".*@domain2$\" wl-draft-parent-folder)
+ (\"From\" . \"user@domain2\"))))")
(defvar wl-draft-config-sub-func-alist
'((body . wl-draft-config-sub-body)
references (wl-delete-duplicates references)
references (when references
(mapconcat 'identity references "\n\t"))))
+ (and wl-draft-use-frame
+ (get-buffer-window summary-buf)
+ (select-window (get-buffer-window summary-buf)))
(wl-draft (list (cons 'To "")
(cons 'Subject
(concat wl-forward-subject-prefix original-subject))
(substring subject (match-end 0))
subject))
+(defun wl-draft-self-reply-p ()
+ "Return t when From address in the current message is user's self one or not."
+ (wl-address-user-mail-address-p (or (elmo-field-body "From") "")))
+
(defun wl-draft-reply-list-symbol (with-arg)
"Return symbol `wl-draft-reply-*-argument-list' match condition.
Check WITH-ARG and From: field."
- (if (wl-address-user-mail-address-p (or (elmo-field-body "From") ""))
+ (if (wl-draft-self-reply-p)
(if with-arg
'wl-draft-reply-myself-with-argument-list
'wl-draft-reply-myself-without-argument-list)
(let (r-list
to mail-followup-to cc subject in-reply-to references newsgroups
to-alist cc-alist decoder parent-folder)
- (set-buffer summary-buf)
- (setq parent-folder (wl-summary-buffer-folder-name))
- (set-buffer buf)
+ (when (buffer-live-p summary-buf)
+ (with-current-buffer summary-buf
+ (setq parent-folder (wl-summary-buffer-folder-name))))
+ (set-buffer (or buf mime-mother-buffer))
(setq r-list (symbol-value (wl-draft-reply-list-symbol with-arg)))
(catch 'done
(while r-list
references (wl-delete-duplicates references)
references (if references
(mapconcat 'identity references "\n\t")))
+ (and wl-draft-use-frame
+ (get-buffer-window summary-buf)
+ (select-window (get-buffer-window summary-buf)))
(wl-draft (list (cons 'To to)
(cons 'Cc cc)
(cons 'Newsgroups newsgroups)
(wl-draft-write-sendlog 'failed 'smtp smtp-server
recipients id)
(if (and (eq (car err) 'smtp-response-error)
- (/= (nth 1 err) 334))
+ (= (nth 1 err) 535))
(elmo-remove-passwd
(wl-smtp-password-key
smtp-sasl-user-name
(switch-to-buffer buffer))
(set-buffer buffer)
(insert-file-contents-as-binary file-name)
+ (elmo-delete-cr-buffer)
(let((mime-edit-again-ignored-field-regexp
"^\\(Content-.*\\|Mime-Version\\):"))
- (wl-draft-decode-message-in-buffer))
+; (wl-draft-decode-message-in-buffer))
+ ;;;; From gnus-article-mime-edit-article-setup in T-gnus
+ ;;;; XXX: it is semi issue, perhaps [wl:10790]
+ (let ((ofn (symbol-function 'mime-edit-decode-single-part-in-buffer)))
+ (fset 'mime-edit-decode-single-part-in-buffer
+ (lambda (&rest args)
+ (unless (let ((content-type (car args)))
+ (eq 'text (mime-content-type-primary-type
+ content-type)))
+ (setcar (cdr args) 'not-decode-text))
+ (apply ofn args)))
+ (unwind-protect
+ (wl-draft-decode-message-in-buffer)
+ (fset 'mime-edit-decode-single-part-in-buffer ofn))))
(wl-draft-insert-mail-header-separator)
(if (not (string-match (regexp-quote wl-draft-folder)
(buffer-name)))
(beginning-of-line)
(goto-char (point-max))))))
+(defsubst wl-draft-config-sub-eval-insert (content &optional newline)
+ (let (content-value)
+ (when (and content
+ (stringp (setq content-value (eval content))))
+ (insert content-value)
+ (if newline (insert "\n")))))
+
(defun wl-draft-config-sub-body (content)
(wl-draft-body-goto-top)
(delete-region (point) (point-max))
- (if content (insert (eval content))))
+ (wl-draft-config-sub-eval-insert content))
(defun wl-draft-config-sub-top (content)
(wl-draft-body-goto-top)
- (if content (insert (eval content))))
+ (wl-draft-config-sub-eval-insert content))
(defun wl-draft-config-sub-bottom (content)
(wl-draft-body-goto-bottom)
- (if content (insert (eval content))))
+ (wl-draft-config-sub-eval-insert content))
(defun wl-draft-config-sub-header (content)
(wl-draft-config-body-goto-header)
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defun wl-draft-config-sub-header-top (content)
(goto-char (point-min))
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defun wl-draft-config-sub-part-top (content)
(goto-char (mime-edit-content-beginning))
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defun wl-draft-config-sub-part-bottom (content)
(goto-char (mime-edit-content-end))
- (if content (insert (concat (eval content) "\n"))))
+ (wl-draft-config-sub-eval-insert content 'newline))
(defsubst wl-draft-config-sub-file (content)
(let ((coding-system-for-read wl-cs-autoconv)
(defun wl-draft-highlight-and-recenter (&optional n)
(interactive "P")
- (if wl-highlight-body-too
- (let ((beg (point-min))
- (end (point-max)))
- (put-text-property beg end 'face nil)
- (wl-highlight-message beg end t)))
+ (when wl-highlight-body-too
+ (let ((modified (buffer-modified-p)))
+ (unwind-protect
+ (progn
+ (put-text-property (point-min) (point-max) 'face nil)
+ (wl-highlight-message (point-min) (point-max) t))
+ (set-buffer-modified-p modified))))
(recenter n))
;;;; user-agent support by Sen Nagata