From c20fb61cd99f50dd4eb03aa29a40b44c802efe17 Mon Sep 17 00:00:00 2001 From: yoichi Date: Tue, 11 Feb 2003 13:01:08 +0000 Subject: [PATCH] * wl-draft.el (wl-draft-send-confirm): New function. (wl-draft-send): Use it. * wl-summary.el (wl-summary-jump-to-msg-by-message-id): Bind cursor-in-echo-area while confirming. --- wl/ChangeLog | 6 ++++++ wl/wl-draft.el | 28 +++++++++++++++++----------- wl/wl-summary.el | 4 ++-- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 9d8086b..21dbdc5 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,11 @@ 2003-02-11 Yoichi NAKAYAMA + * wl-draft.el (wl-draft-send-confirm): New function. + (wl-draft-send): Use it. + + * wl-summary.el (wl-summary-jump-to-msg-by-message-id): Bind + cursor-in-echo-area while confirming. + * wl-summary.el (wl-summary-virtual): Call wl-summary-virtual-hook. * wl-summary.el (wl-summary-jump-to-msg-by-message-id): Force diff --git a/wl/wl-draft.el b/wl/wl-draft.el index bd5e929..690411e 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1237,6 +1237,22 @@ If FORCE-MSGID, insert message-id regardless of `wl-insert-message-id'." (setq locals (cdr locals))) result)) +(defun wl-draft-send-confirm () + (let (result answer) + (save-excursion + (goto-char (point-min)) + (message "Send current draft? ") + (setq answer (let ((cursor-in-echo-area t)) (read-char)))) + (cond + ((or (eq answer (string-to-char "y")) + (eq answer (string-to-char "Y")) + (eq answer (string-to-char " "))) + (setq result t)) + ((or (eq answer (string-to-char "p")) + (eq answer (string-to-char "P"))) + (wl-draft-preview-message))) + result)) + (defun wl-draft-send (&optional kill-when-done mes-string) "Send current draft message. If KILL-WHEN-DONE is non-nil, current draft buffer is killed" @@ -1246,17 +1262,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" ;; (wl-draft-config-exec) (run-hooks 'wl-draft-send-hook) (when (or (not wl-interactive-send) - (let (result) - (wl-draft-preview-message) - (goto-char (point-min)) - (condition-case nil - (setq result - (y-or-n-p "Do you really want to send current draft? ")) - (quit - (mime-preview-quit) - (signal 'quit nil))) - (mime-preview-quit) - result)) + (wl-draft-send-confirm)) (let ((send-mail-function 'wl-draft-raw-send) (editing-buffer (current-buffer)) (sending-buffer (wl-draft-generate-clone-buffer diff --git a/wl/wl-summary.el b/wl/wl-summary.el index aa9217c..2911246 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4730,9 +4730,9 @@ Return t if message exists." (wl-summary-buffer-folder-name) original 'no-sync)) (cond ((eq wl-summary-search-via-nntp 'confirm) (require 'elmo-nntp) - (message "Search message in nntp server \"%s\" ?" + (message "Search message in nntp server \"%s\" ? " elmo-nntp-default-server) - (setq schar (read-char)) + (setq schar (let ((cursor-in-echo-area t)) (read-char))) (cond ((eq schar ?y) (wl-summary-jump-to-msg-by-message-id-via-nntp msgid)) ((eq schar ?s) -- 1.7.10.4