(wl-draft-reply-position): Fix.
* wl-summary.el (wl-summary-reply): Use `wl-draft-reply-position'.
(wl-summary-target-mark-reply-with-citation): Ditto.
(wl-summary-reply-with-citation): Ditto.
* wl-vars.el (wl-draft-reply-default-position): New variable.
2002-12-22 Kenichi OKADA <okada@opaopa.org>
+ * wl-draft.el (wl-draft-reply-position): New function.
+ (wl-draft-reply-position): Fix.
+ * wl-summary.el (wl-summary-reply): Use `wl-draft-reply-position'.
+ (wl-summary-target-mark-reply-with-citation): Ditto.
+ (wl-summary-reply-with-citation): Ditto.
+ * wl-vars.el (wl-draft-reply-default-position): New variable.
+
+2002-12-22 Kenichi OKADA <okada@opaopa.org>
+
* wl-draft.el (wl-draft-send): Preview when interactive send.
2002-12-22 Kenichi OKADA <okada@opaopa.org>
(cons 'Mail-Followup-To mail-followup-to))
nil nil nil nil parent-folder)
(setq wl-draft-reply-buffer buf)
- (run-hooks 'wl-reply-hook)
- (or (and to
- (progn (mail-position-on-field "To")
- (wl-draft-beginning-of-line)))
- (and newsgroups
- (progn (mail-position-on-field "Newsgroups")
- (wl-draft-beginning-of-line))))))
+ (run-hooks 'wl-reply-hook)))
+
+(defun wl-draft-reply-position (position)
+ (cond ((eq position 'body)
+ (wl-draft-body-goto-top))
+ ((eq position 'bottom)
+ (wl-draft-body-goto-bottom))
+ ((eq position 'top)
+ (goto-char (point-min)))
+ ((and (stringp position)
+ (std11-field-body position))
+ (progn (mail-position-on-field position)
+ (wl-draft-beginning-of-line)))
+ ((listp position)
+ (while (car position)
+ (wl-draft-reply-position (car position))
+ (setq position (cdr position))))))
(defun wl-draft-add-references ()
(wl-draft-add-in-reply-to "References"))
draft-buf)
(wl-summary-jump-to-msg (car mlist))
(wl-summary-reply arg t)
- (save-excursion
- (goto-char (point-max))
- (setq start-point (point-marker))
- (setq draft-buf (current-buffer))
- (save-window-excursion
- (while mlist
- (set-buffer summary-buf)
- (delete-other-windows)
- (wl-summary-jump-to-msg (car mlist))
- (wl-summary-redisplay)
- (set-buffer draft-buf)
- (goto-char (point-max))
- (wl-draft-yank-original)
- (setq mlist (cdr mlist)))
- (goto-char start-point)
- (save-excursion
- (set-buffer summary-buf)
- (wl-summary-delete-all-temp-marks)))
- (run-hooks 'wl-mail-setup-hook))))
+ (goto-char (point-max))
+ (setq start-point (point-marker))
+ (setq draft-buf (current-buffer))
+ (save-window-excursion
+ (while mlist
+ (set-buffer summary-buf)
+ (delete-other-windows)
+ (wl-summary-jump-to-msg (car mlist))
+ (wl-summary-redisplay)
+ (set-buffer draft-buf)
+ (goto-char (point-max))
+ (wl-draft-yank-original)
+ (setq mlist (cdr mlist)))
+ (goto-char start-point)
+ (save-excursion
+ (set-buffer summary-buf)
+ (wl-summary-delete-all-temp-marks)))
+ (wl-draft-reply-position wl-draft-reply-default-position)
+ (run-hooks 'wl-mail-setup-hook)))
(defun wl-summary-reply-with-citation (&optional arg)
(interactive "P")
(when (wl-summary-reply arg t)
- (save-excursion
- (goto-char (point-max))
- (wl-draft-yank-original)
- (run-hooks 'wl-mail-setup-hook))))
+ (goto-char (point-max))
+ (wl-draft-yank-original)
+ (wl-draft-reply-position wl-draft-reply-default-position)
+ (run-hooks 'wl-mail-setup-hook)))
(defun wl-summary-jump-to-msg-by-message-id (&optional id)
(interactive)
(goto-char (point-min))
(when (setq mes-buf (wl-message-get-original-buffer))
(wl-draft-reply mes-buf arg summary-buf)
+ (wl-draft-reply-position wl-draft-reply-default-position)
(unless without-setup-hook
- (save-excursion
- (run-hooks 'wl-mail-setup-hook))))
+ (run-hooks 'wl-mail-setup-hook)))
t)))
(defun wl-summary-write ()
(sexp :tag "Use Function"))
:group 'wl-draft)
+(defcustom wl-draft-reply-default-position 'body
+ "Begining position of reply buffer.
+'body means the top of body.
+'bottom means the bottom of body.
+'top means the top of header.
+\"To\", \"Newsgroups\", \"Subject\" means the position of the header field.
+You can also set it to a list of setting.
+"
+ :type '(choice (repeat
+ (choice
+ (const :tag "Top of body" body)
+ (const :tag "Bottom of body" bottom)
+ (const :tag "Top of header" top)
+ (const "To")
+ (const "Newsgroups")
+ (const "Subject")
+ (string :tag "Header Name")))
+ (const "To")
+ (const "Newsgroups")
+ (const "Subject")
+ (string :tag "Header Name"))
+ :group 'wl-draft)
+
(defcustom wl-draft-queue-save-variables
'(wl-envelope-from wl-from
wl-smtp-posting-server wl-smtp-posting-user wl-smtp-posting-port