1 ; This file implements the autoloaded "exit" function (not a command) of mhe.
4 (temp-use-buffer "cmd-buffer")
6 (setq ans (get-response "Preparing to exit. Action? [q, e, u, ?] "
8 "q: quit (don't process) e: exit (after processing) u: undo (don't exit)"))
9 (if (| (= ans 'q') (= ans '\
\ 3'))
11 (temp-use-buffer "cmd-buffer") (setq ans 'y')
12 (if (> (buffer-size) 0)
14 (get-response "Really exit without processing? "
15 "yYnN\
\ 3" "y for Yes or n for No")))
16 (if (| (= ans 'y') (= ans '\
\ 3'))
18 (pop-to-buffer (concat "+" mh-folder))
26 (temp-use-buffer "cmd-buffer")
27 (if (!= 0 (buffer-size))
29 (temp-use-buffer "cmd-buffer")
30 (message "Processing deletes and moves...")
33 (beginning-of-file) (set-mark) (end-of-file)
35 (setq s (region-to-string))
37 (setq buffer-is-modified 0)
38 (temp-use-buffer (concat "+" mh-folder))
39 (&mh-make-headers-current)
40 (setq buffer-is-modified 0)
52 (split-long-lines t s ; make sure no overlong lines in cmd-buffer
57 (progn (beginning-of-line)
58 (setq t (dot)) (end-of-line) (> (dot) (+ t 200)))
59 (beginning-of-line) (set-mark)
60 (if (looking-at "rmm")
61 (progn (forward-word) (forward-word) (forward-word)
64 (progn (forward-word) (forward-word)
65 (forward-word) (forward-word)
66 (forward-word) (backward-word))
68 (setq s (region-to-string)) (beginning-of-line)
69 (goto-character (+ (dot) 200)) (backward-word)
70 (delete-previous-character) (newline)
74 (setq buffer-is-modified 0)