-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmule.com
42 lines (42 loc) · 1.36 KB
/
mule.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$ goto := goto
$ if := if
$ define := define
$ exit := exit
$!
$ currentDirectory = f$parse(f$env("procedure"),,,,"no_conceal")
$ currentDirectory = f$parse(currentDirectory,,,"device") -
+ f$parse(currentDirectory,,,"directory")
$ len = f$length(currentDirectory)
$loopOne:
$ locate = f$locate("<",currentDirectory)
$ if locate .eq. len then goto exitLoopOne
$ currentDirectory[locate,1] := "["
$ currentDirectory[f$locate(">",currentDirectory),1] := "]"
$ goto loopOne
$exitLoopOne:
$ currentDirectory = currentDirectory - "]["
$ len = f$length (currentDirectory)
$loopTwo:
$ locate = f$locate("000000.", currentDirectory)
$ if locate .eq. len then goto exitLoopTwo
$ currentDirectory = currentDirectory - "000000."
$ len = f$length (currentDirectory)
$ goto LoopTwo
$exitLoopTwo:
$ locate = f$locate (".000000", currentDirectory)
$ if locate .eq. len then goto exitLoopThree
$ currentDirectory = currentDirectory - ".000000"
$ len = f$length (currentDirectory)
$ goto exitLoopTwo
$exitLoopThree:
$ emacsRoot = currentDirectory - "]" + ".]"
$ qual = p1
$ define 'qual' /trans=(conc,term) emacs_library 'emacsRoot'
$ define 'qual' termcap emacs_library:[etc]termcap.dat
$ define 'qual' emacs_term "vt100"
$ emacs :== @ emacs_library:[000000]kepteditor emacs
$ runemacs :== $ emacs_library:[000000]mule -
-map emacs_library:[000000]mule.dump
$ ! For Mule
$ mule == emacs
$ exit