Mercurial > hg > xemacs-beta
comparison vms/kepteditor.com @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 $ verify = f$verify (0) | |
2 $ ! | |
3 $ ! Kept_Editor.COM | |
4 $ ! Command file for use on VMS to spawn an Emacs process | |
5 $ ! that can be suspended with C-z and will not go away | |
6 $ ! when other programs are run. This is the normal way | |
7 $ ! for users to invoke Emacs on VMS; the command "emacs" | |
8 $ ! is normally defined to execute this file. | |
9 $ ! That definition, and other definitions used by it, are done by `emacs.com'. | |
10 $ ! Users who want to use Emacs should have their `login.com' files | |
11 $ ! execute `emacs.com', which is to be found in this directory. | |
12 $ ! | |
13 $ ! Joe Kelsey | |
14 $ ! FlexComm Corp. | |
15 $ ! | |
16 $ ! September, 1985 | |
17 $ ! | |
18 $ ! Run or attach to an editor in a kept fork. | |
19 $ ! | |
20 $ ! Modified by Marty Sasaki to define the job logical name | |
21 $ ! "EMACS_FILE_NAME" with the value of the filename on the command | |
22 $ ! line. Lisp code can then use the value of the logical to resume or | |
23 $ ! to start editing in that file. | |
24 $ ! | |
25 $ ! | |
26 $ edit = "" | |
27 $ name = p1 + " " + f$trnlnm ( "TT" ) - ":" | |
28 $ priv_list = f$setprv ("NOWORLD, NOGROUP") | |
29 $ pid = 0 | |
30 $ 10$: | |
31 $ proc = f$getjpi ( f$pid ( pid ), "PRCNAM") | |
32 $ if proc .eqs. name then - | |
33 $ goto attach | |
34 $ if pid .ne. 0 then - | |
35 $ goto 10$ | |
36 $ spawn: | |
37 $ args = p2 + " " + p3 + " " + p4 + " " + p5 + " " + - | |
38 p6 + " " + p7 + " " + p8 | |
39 $ priv_list = f$setprv ( priv_list ) | |
40 $ write sys$error - | |
41 "[Spawning a new Kept ''P1']" | |
42 $ if p1 .nes. "TPU" then - | |
43 $ goto check_emacs | |
44 $ define/user sys$input sys$command | |
45 $ spawn /process="''NAME'" - | |
46 /nolog - | |
47 edit/'p1' 'args' | |
48 $ goto quit1 | |
49 $ check_emacs: | |
50 $ if p1 .nes. "EMACS" then - | |
51 $ goto un_kempt | |
52 $ define/user sys$input sys$command | |
53 $ spawn /process="''NAME'" - | |
54 /nolog - | |
55 runemacs 'args' | |
56 $ goto quit1 | |
57 $ un_kempt: | |
58 $ ! The editor is unruly - spawn a process and let the user deal with the | |
59 $ ! editor himself. | |
60 $ spawn /process="''NAME'" - | |
61 /nolog | |
62 $ goto quit1 | |
63 $ attach: | |
64 $ priv_list = f$setprv ( priv_list ) | |
65 $ message_status = f$environment("message") | |
66 $ set noon | |
67 $ on control_y then goto quit | |
68 $ set message /nofacility/noidentification/noseverity/notext | |
69 $ if p2 .eqs. "" then goto no_logical | |
70 $ temp = f$trnlnm("SYS$DISK") + f$directory() + p2 | |
71 $ temp = f$edit(temp,"lowercase") | |
72 $ define/nolog/job emacs_file_name "''temp'" | |
73 $ no_logical: | |
74 $ write sys$error - | |
75 "[Attaching to process ''NAME']" | |
76 $ define/user sys$input sys$command | |
77 $ attach "''NAME'" | |
78 $ quit: | |
79 $ set noon | |
80 $ if p2 .eqs. "" then goto quit1 | |
81 $ deassign/job emacs_file_name | |
82 $ quit1: | |
83 $ set message 'message_status | |
84 $ write sys$error - | |
85 "[Attached to DCL in directory ''F$TRNLNM("SYS$DISK")'''F$DIRECTORY()']" | |
86 $ if verify then - | |
87 $ set verify | |
88 $ exit |