|
|
1.1 root 1: ; emh-inc.ml :: implements emh inc command
2: ; Wed Oct 5 11:15:51 1983 /mtr <mrose@uci-750a>
3:
4:
5: (defun
6:
7: (&mh-inc &buffer &drop &folder
8: (setq &folder
9: (if (| prefix-argument-provided (> (nargs) 0))
10: (arg 1 ": mh-inc (to folder) ") "+inbox"))
11: (setq &drop
12: (if (| prefix-argument-provided (> (nargs) 1))
13: (arg 2
14: (concat ": mh-inc (to folder) " &folder " (from drop) "))
15: ""))
16: (if (!= (substr &folder 1 1) "+")
17: (setq &folder (concat "+" &folder)))
18: (setq &buffer (&mh-unique &mhexec))
19: (error-occured (delete-buffer &buffer))
20: (save-excursion
21: (temp-use-buffer &buffer)
22: (setq needs-checkpointing 0)
23: (erase-buffer)
24: (&mh-start-process
25: (concat "inc " (setq &mhfolder &folder)
26: (if (!= &drop "")
27: (concat " -ms " (&mh-path &drop)) ""))
28: &buffer)
29: (insert-sentinel &buffer "&mh-inc-sentinel")
30: (setq mode-string "Starting")
31: (setq mode-line-format
32: (concat " " &mhexec ": inc " &folder " from "
33: (if (!= &drop "") &drop "maildrop")
34: " (status: %m) %M")))
35:
36: (novalue)
37: )
38:
39: (&mh-inc-sentinel &abnormal &flag &text
40: (setq &abnormal 1)
41: (setq &flag (>> prefix-argument 16))
42: (setq &text (process-output))
43: (save-excursion
44: (temp-use-buffer MPX-process)
45: (setq mode-string (substr &text 1 (- (length &text) 1)))
46: (if (= mode-string "Exited")
47: (progn
48: (beginning-of-file)
49: (if (looking-at "^Incorporating")
50: (progn (&mh-scan &mhfolder) (setq &abnormal 0))))))
51: (dot-is-visible) ; hack...
52: (if (bitwise-and &flag 12)
53: (if &abnormal
54: (save-excursion
55: (pop-to-buffer MPX-process)
56: (beginning-of-file))
57: (&mh-daemon)))
58: )
59: )
60:
61: (novalue)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.