2003-02-11 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+ * 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
(setq locals (cdr locals)))
result))
+(defun wl-draft-send-confirm ()
+ (let (result answer)
+ (save-excursion
+ (goto-char (point-min))
+ (message "Send current draft? <y/n/p(review)> ")
+ (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"
;; (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
(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\" <y/n/s(elect)>?"
+ (message "Search message in nntp server \"%s\" <y/n/s(elect)>? "
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)