annotate vms/kepteditor.com @ 85:c661705957e0

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