Skip to content

Commit 58f8fbd

Browse files
authored
Restore REM.CM to be separate file from greet file; Enable chaining of medley runs using REM.CM file (#2027)
- Fixed INTERPRET.REM.CM so that it no longer tries to load the file pointed to by LDEINIT and instead loads the file pointed to by LDEREMCM. LDEINIT remains the file used by greet. - Adjusted the medley script to have a new argument -cm (or --rem.cm) which sets LDEREMCM as appropriate before launching lde. - Updated the loadup scripts as required to use this new -cm argument when calling medley. Finally, added a new feature to the medley script -cc (or --repeat) whereby which when medley finishes it checks for a nonzero file given as the argument to -cc. If that file exists, medley is run again (i.e., repeated) with LDEREMCM set to that file. This repeats until this file no longer exists or is zero-length. The file can be found as the vale of LDEREPEATCM so that each invocation of medley can modify (or delete) this file so as to change the subsequent run of medley.
1 parent 3aa58b6 commit 58f8fbd

18 files changed

+493
-134
lines changed

docs/man-page/man_medley.html

Lines changed: 264 additions & 76 deletions
Large diffs are not rendered by default.

docs/man-page/medley.1

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
.\" Automatically generated by Pandoc 2.9.2.1
1+
.\" Automatically generated by Pandoc 3.1.3
22
.\"
3+
.\" Define V font for inline verbatim, using C font in formats
4+
.\" that render this, and otherwise B font.
5+
.ie "\f[CB]x\f[]"x" \{\
6+
. ftr V B
7+
. ftr VI BI
8+
. ftr VB B
9+
. ftr VBI BI
10+
.\}
11+
.el \{\
12+
. ftr V CR
13+
. ftr VI CI
14+
. ftr VB CB
15+
. ftr VBI CBI
16+
.\}
317
.ad l
418
.TH "MEDLEY" "1" "" "" "Start Medley Interlisp"
519
.nh
@@ -8,8 +22,8 @@
822
\f[B]medley\f[R] \[em] starts up Medley Interlisp
923
.SH SYNOPSIS
1024
.PP
11-
\f[B]medley\f[R] [ flags \&... ] [ \f[I]SYSOUT_FILE\f[R] ] [ --
12-
\f[I]PASS_ON_ARGS\f[R] ]
25+
\f[B]medley\f[R] [ flags \&...
26+
] [ \f[I]SYSOUT_FILE\f[R] ] [ -- \f[I]PASS_ON_ARGS\f[R] ]
1327
.SH DESCRIPTION
1428
.PP
1529
Starts Medley Interlisp in a window.
@@ -291,6 +305,21 @@ On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the
291305
Medley file system, not the host Windows file system.
292306
.RE
293307
.TP
308+
-cm [\f[I]FILE\f[R] | -], --rem.cm [\f[I]FILE\f[R] | -]
309+
Use \f[I]FILE\f[R] as the REM.CM file that Medley reads and executes at
310+
startup - after any greet files.
311+
Usually used only for loadups and other maintenance operations .
312+
.RS
313+
.PP
314+
If the given value is \[lq]-\[rq], Medley will start up without using
315+
REM.CM file.
316+
.PP
317+
There is no default Medley REM.CM file.
318+
.PP
319+
On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the
320+
Medley file system, not the host Windows file system.
321+
.RE
322+
.TP
294323
-x [\f[I]DIR\f[R] | - | \[en]], --logindir [\f[I]DIR\f[R] | - | \[en]]
295324
Use \f[I]DIR\f[R] as LOGINDIR in Medley.
296325
\f[I]DIR\f[R] must be writeable by the current user.
@@ -341,6 +370,22 @@ Relevant only to the Medley loadup workflow.
341370
\[en]maikodir \f[I]DIR\f[R]
342371
Use \f[I]DIR\f[R] as the directory containing the Maiko emulator.
343372
For testing purposes only.
373+
.TP
374+
-cc [\f[I]FILE\f[R] | -], --repeat [\f[I]FILE\f[R] | -]
375+
Run Medley once.
376+
And then as long as \f[I]FILE\f[R] exists and is greater then zero
377+
length, repeatedly run Medley using \f[I]FILE\f[R] as the REM.CM file
378+
that Medley reads and executes at startup.
379+
Each run of Medley can change the contents of \f[I]FILE\f[R] to effect
380+
the subsequent run of Medley.
381+
To end the cycle, Medley needs to delete \f[I]FILE\f[R].
382+
WIthin Medley, \f[I]FILE\f[R] can be found as the value of the
383+
environment variable LDEREPEATCM.
384+
.RS
385+
.PP
386+
On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the
387+
Medley file system, not the host Windows file system.
388+
.RE
344389
.SS Other Options
345390
.PP
346391
\

docs/man-page/medley.1.gz

391 Bytes
Binary file not shown.

docs/man-page/medley.1.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% MEDLEY(1) | Start Medley Interlisp
1+
% MEDLEY(1) | Start Medley Interlisp
22

33
---
44
adjusting: l
@@ -210,6 +210,16 @@ in which case it is $MEDLEYDIR/greetfiles/APPS-INIT.
210210
On Windows/Cygwin installations, *FILE* is
211211
specified in the Medley file system, not the host Windows file system.
212212

213+
-cm \[*FILE* | -], \-\-rem.cm \[*FILE* | -]
214+
: Use *FILE* as the REM.CM file that Medley reads and executes at startup - after any greet files. Usually used only for loadups and other maintenance operations .
215+
216+
If the given value is "-", Medley will start up without using REM.CM file.
217+
218+
There is no default Medley REM.CM file.
219+
220+
On Windows/Cygwin installations, *FILE* is
221+
specified in the Medley file system, not the host Windows file system.
222+
213223
-x \[*DIR* | - | --], \-\-logindir \[*DIR* | - | --]
214224
: Use *DIR* as LOGINDIR in Medley. *DIR* must be writeable by the current user.
215225

@@ -242,6 +252,12 @@ for the parameter will be reset to the default value - which in the case of *Hos
242252
--maikodir *DIR*
243253
: Use *DIR* as the directory containing the Maiko emulator. For testing purposes only.
244254

255+
-cc \[*FILE* | -], \-\-repeat \[*FILE* | -]
256+
: Run Medley once. And then as long as *FILE* exists and is greater then zero length, repeatedly run Medley using *FILE* as the REM.CM file that Medley reads and executes at startup. Each run of Medley can change the contents of *FILE* to effect the subsequent run of Medley. To end the cycle, Medley needs to delete *FILE*. WIthin Medley, *FILE* can be found as the value of the environment variable LDEREPEATCM.
257+
258+
On Windows/Cygwin installations, *FILE* is
259+
specified in the Medley file system, not the host Windows file system.
260+
245261

246262
Other Options
247263
-------------

scripts/loadup-apps-from-full.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ main() {
3232
exit 1
3333
fi
3434

35-
git_commit_ID "${NOTECARDSDIR}"
36-
NOTECARDS_COMMIT_ID="${COMMIT_ID}"
37-
export NOTECARDS_COMMIT_ID
35+
git_commit_ID "${NOTECARDSDIR}"
36+
NOTECARDS_COMMIT_ID="${COMMIT_ID}"
37+
export NOTECARDS_COMMIT_ID
3838

39+
initfile="-"
3940
cat >"${cmfile}" <<-"EOF"
4041
"
4142

scripts/loadup-aux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ main() {
88

99
loadup_start
1010

11+
initfile="-"
1112
cat >"${cmfile}" <<-"EOF"
1213
"
1314
(PROG

scripts/loadup-db-from-full.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ main() {
1313
exit 1
1414
fi
1515

16+
initfile="-"
1617
cat >"${cmfile}" <<-"EOF"
1718
"
1819

scripts/loadup-full-from-lisp.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ main() {
66

77
loadup_start
88

9+
initfile="-"
910
cat >"${cmfile}" <<-"EOF"
1011
"
1112

scripts/loadup-init.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ main() {
66

77
loadup_start
88

9-
cat >"${cmfile}" <<-"EOF"
9+
cmfile="-"
10+
cat >"${initfile}" <<-"EOF"
1011
(* "make init files; this file is loaded as a 'greet' file by scripts/loadup-init.sh")
1112
1213
(SETQ MEDLEYDIR NIL)
@@ -40,7 +41,7 @@ main() {
4041
(LOGOUT T)
4142
STOP
4243
EOF
43-
44+
4445
run_medley "${LOADUP_SOURCEDIR}/starter.sysout"
4546

4647
loadup_finish "init.dlinit" "init.*" "RDSYS*" "I-NEW*"

scripts/loadup-lisp-from-mid.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ main() {
55
. "${LOADUP_SCRIPTDIR}/loadup-setup.sh"
66

77
loadup_start
8-
8+
9+
initfile="-"
910
cat >"${cmfile}" <<-"EOF"
1011
"
1112

0 commit comments

Comments
 (0)