1 ; This autoloaded file implements the "r" command of mhe
3 (&mh-repl actn exfl sm fn annotate ft
7 (temp-use-buffer (concat "+" mh-folder))
8 (setq fn (&mh-get-fname))
9 (setq annotate mh-annotate)
10 (setq ft mh-folder-title)
11 (temp-use-buffer "message")
12 (setq mode-string "mhe")
13 (setq sm mode-line-format)
14 (message "Replying to message " (&mh-get-msgnum) "...")
16 (pop-to-buffer "message")
17 (if (error-occured (read-file fn))
18 (error-message "Message " fn " does not exist!"))
19 (pop-to-buffer "reply") (erase-buffer)
20 (insert-string "One moment, please....")
21 (unlink-file (concat mh-path "/reply"))
24 (concat mh-progs "/repl -build +" ft " "
29 (if (file-exists (concat mh-path "/reply"))
30 (read-file (concat mh-path "/reply"))
31 (error-message "Reply failed: cannot construct header"
32 " (file " mh-path "/reply)")
34 (pop-to-buffer "reply")
35 (local-bind-to-key "exit-emacs" "\
\18\
\ 3")
36 (mail-mode) (end-of-file)
40 (pop-to-buffer "message")
41 (setq mode-line-format
42 "{%b} %[^X^C exits to top level%] %M")
43 (pop-to-buffer "reply")
44 (setq mode-line-format
46 "%[%p of " mh-path "/reply"
47 "%] (^X^C exits to top level) %M"))
48 (&mh-restore-killbuffer)
50 (setq mode-line-format
51 (concat "%[%p of " mh-path "/reply%] %M"))
52 (pop-to-buffer "message")
53 (setq mode-line-format sm)
56 (setq actn (get-response "Ready to send. Action? (m, q, e, or ?) " "mMqQeE\
\ 3"
57 "m: mail it, q: quit, e: resume editing, ?: this msg."))
59 (progn (message "Sending...") (sit-for 0)
60 (pop-to-buffer "reply")
63 (concat mh-progs "/send -noverbose "
66 (pop-to-buffer "message")
73 (&mh-restore-killbuffer)
74 (pop-to-buffer (concat "+" mh-folder))
75 (delete-other-windows)
76 (setq mode-line-format sm)
77 (error-message "Message not sent; its text remains in buffer 'reply'")
82 (pop-to-buffer (concat "+" mh-folder)) (delete-other-windows)
83 (pop-to-buffer "message")
84 (setq mode-line-format sm) (previous-window)