* wl-draft.el (wl-draft-reply): Set default position.
authorokada <okada>
Sat, 21 Dec 2002 15:39:36 +0000 (15:39 +0000)
committerokada <okada>
Sat, 21 Dec 2002 15:39:36 +0000 (15:39 +0000)
* wl-summary.el (wl-summary-reply): Ditto.
(wl-summary-reply-with-citation): Ditto.
(wl-summary-target-mark-reply-with-citation): Ditto.

wl/ChangeLog
wl/wl-draft.el
wl/wl-summary.el

index 6dd7a6f..560839d 100644 (file)
@@ -1,3 +1,10 @@
+2002-12-22  Kenichi OKADA  <okada@opaopa.org>
+
+       * 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  <yoichi@eken.phys.nagoya-u.ac.jp>
 
        * wl-news.el.in (wl-news-lang): Set default value according to
index 9b9be0c..18e9427 100644 (file)
@@ -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"))
index ab0ca52..7f0b615 100644 (file)
@@ -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 ()