From: okada Date: Sat, 21 Dec 2002 15:39:36 +0000 (+0000) Subject: * wl-draft.el (wl-draft-reply): Set default position. X-Git-Tag: merged-trunk-to-elmo-mark-14~73 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f478e522a7c53e8d7151a32e7548cdc0ee954ec;p=elisp%2Fwanderlust.git * wl-draft.el (wl-draft-reply): Set default position. * wl-summary.el (wl-summary-reply): Ditto. (wl-summary-reply-with-citation): Ditto. (wl-summary-target-mark-reply-with-citation): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 6dd7a6f..560839d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-12-22 Kenichi OKADA + + * wl-draft.el (wl-draft-reply): Set default position. + * wl-summary.el (wl-summary-reply): Ditto. + (wl-summary-reply-with-citation): Ditto. + (wl-summary-target-mark-reply-with-citation): Ditto. + 2002-12-21 Yoichi NAKAYAMA * wl-news.el.in (wl-news-lang): Set default value according to diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 9b9be0c..18e9427 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -475,8 +475,14 @@ Reply to author if WITH-ARG is non-nil." (cons 'References references) (cons 'Mail-Followup-To mail-followup-to)) nil nil nil nil parent-folder) - (setq wl-draft-reply-buffer buf)) - (run-hooks 'wl-reply-hook)) + (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)))))) (defun wl-draft-add-references () (wl-draft-add-in-reply-to "References")) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index ab0ca52..7f0b615 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4695,31 +4695,33 @@ Return t if message exists." draft-buf) (wl-summary-jump-to-msg (car mlist)) (wl-summary-reply arg t) - (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))) + (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)))) (defun wl-summary-reply-with-citation (&optional arg) (interactive "P") (when (wl-summary-reply arg t) - (goto-char (point-max)) - (wl-draft-yank-original) - (run-hooks 'wl-mail-setup-hook))) + (save-excursion + (goto-char (point-max)) + (wl-draft-yank-original) + (run-hooks 'wl-mail-setup-hook)))) (defun wl-summary-jump-to-msg-by-message-id (&optional id) (interactive) @@ -4924,7 +4926,8 @@ Reply to author if invoked with ARG." (when (setq mes-buf (wl-message-get-original-buffer)) (wl-draft-reply mes-buf arg summary-buf) (unless without-setup-hook - (run-hooks 'wl-mail-setup-hook))) + (save-excursion + (run-hooks 'wl-mail-setup-hook)))) t))) (defun wl-summary-write ()