mirror of
https://github.com/PDP-10/its.git
synced 2026-01-28 12:59:20 +00:00
Dump a new EMACS.
This commit is contained in:
committed by
Eric Swenson
parent
6196423833
commit
21410433c2
@@ -221,6 +221,22 @@ respond ":EJ" "\030\003"
|
||||
respond "*" ":kill\r"
|
||||
respond "*" ":delete emacs;\[prfy\] <\r"
|
||||
|
||||
respond "*" ":emacs\r"
|
||||
respond "for help" "\033xload\033purify\r"
|
||||
type "\033xgenerate\033emacs;aux\033emacs1;aux\r"
|
||||
respond ":EJ" "\030\003"
|
||||
respond "*" ":kill\r"
|
||||
|
||||
respond "*" ":delete emacs;ts 126\r"
|
||||
respond "*" ":delete \[pure\] 162\r"
|
||||
respond "*" ":rename \[pure\] 163, \[pure\] 162\r"
|
||||
|
||||
respond "*" "emacs\033\023"
|
||||
respond "*" ":teco\r"
|
||||
respond "&" "mmrun\033purify\033dump\033ts 126\033\033"
|
||||
respond "&" "\003"
|
||||
respond "*" ":kill\r"
|
||||
|
||||
respond "*" ":midas sysbin;_syseng;dump\r"
|
||||
respond "WHICH MACHINE?" "DB\r"
|
||||
expect ":KILL"
|
||||
|
||||
83
src/emacs/emacs.teco
Executable file
83
src/emacs/emacs.teco
Executable file
@@ -0,0 +1,83 @@
|
||||
!* -*-TECO-*- *!
|
||||
|
||||
!* This is the TECO INIT for EMACS. It sets up the EMACS environment
|
||||
necessary for dumping a new EMACS EJ file. *!
|
||||
|
||||
-1fs^Idisablew !* do this first for comments!
|
||||
:ejDSK:EMACS;EMACS :EJu0 !* load in the EMACS library!
|
||||
er ec fs if versionu2 !* Save version number.!
|
||||
fs osteco"e fs i fileu1'
|
||||
"# fs i filefs d file !* Save filename.!
|
||||
etdsk:emacs; !* On twenex, stick in "emacs;' rather than the!
|
||||
fs d fileu1' !* actual directory on which it resides.!
|
||||
|
||||
fs osteco"n !* Twenex!
|
||||
:ejDSK:<EMACS>TWENEX.:EJw !* load in the TWENEX library!
|
||||
er ec
|
||||
fs i filefs d file
|
||||
et dsk:emacs;
|
||||
fs d fileu3 !* save filename of TWENEX library!
|
||||
'
|
||||
:i*& Macro Get,q0m(q0+4)u.m !* call the loader in the EMACS library!
|
||||
!* to find .M!
|
||||
f[ :ej page !* save :EJ page for flushing EINIT!
|
||||
:ejDSK:EMACS;EINIT :EJw !* load EINIT library!
|
||||
|
||||
m(m.m& Load Essential Environment)
|
||||
|
||||
q1m.vEMACS Library Filename !* save EMACS library filename!
|
||||
q2m.vEMACS Versionw !* version no. too!
|
||||
fs osteco"n !* Twenex!
|
||||
q3m.vTWENEX Library Filenamew' !* save TWENEX library filename!
|
||||
|
||||
q2:\u2
|
||||
m(m.m& Load Patches)emacs;pat2 > !* Load patches to this EMACS version.!
|
||||
m(m.m& Load Patches)patch > !* Load site-specific non-version-specific patches.!
|
||||
m(m.m& Load Default Environment)
|
||||
|
||||
m(m.mPurify Variables) !* smash variable names to point to pure!
|
||||
!* space if there is a copy there!
|
||||
f] :ej page !* flush EINIT!
|
||||
|
||||
!* All we should do when restarted is run ..L, which is & Toplevel ^R.!
|
||||
q..lm.vMM & Startup EMACS
|
||||
|
||||
!* The first entry to ^R will run the value of *Initialization*.
|
||||
Here we define that to read in and process the user's init file.!
|
||||
|
||||
fsosteco"e @:i*| !* ITS!
|
||||
etDSK:EMACS !* set device name and FN2!
|
||||
fs hsname fs dsnamew !* fill in directory!
|
||||
fs xuname fs dfn1w !* and FN1!
|
||||
1:<er>"l
|
||||
1:<er*>"l
|
||||
erEMACS;*''
|
||||
fs d file[2 et@ >
|
||||
!** end of system-dependent code!
|
||||
fs msname fs dsname
|
||||
qEMACS Version:\u1 !* sigh, still need this!
|
||||
@y 1a-127"n ]2 :i*[..9 !* if init doesnt begin with rubout then!
|
||||
m(hfx*( 0fsmodifiedw))' !* execute it as TECO commands!
|
||||
hk 0fsmodified
|
||||
1,m(m.mLoad Library)2 !* else load it as a library,!
|
||||
!* saving the filename!
|
||||
|
||||
|m.v*Initialization*'
|
||||
"# @:i*| !* Twenex!
|
||||
etDSK:EMACS.INIT fs hsname fs dsname
|
||||
1:<er>"l erDSK:<EMACS>'
|
||||
fs d file[2 et foo..
|
||||
!** end of system-dependent code!
|
||||
fs msname fs dsname
|
||||
qEMACS Version:\u1 !* sigh, still need this!
|
||||
@y 1a-127"n ]2 :i*[..9 !* if init doesnt begin with rubout then!
|
||||
m(hfx*( 0fsmodifiedw))' !* execute it as TECO commands!
|
||||
hk 0fsmodified
|
||||
1,m(m.mLoad Library)2 !* else load it as a library!
|
||||
!* saving the filename!
|
||||
|
||||
|m.v*Initialization*'
|
||||
|
||||
0u0 0u1 0u2 0u3 !* zero the q-regs we've used!
|
||||
|
||||
hk
|
||||
850
src/emacs1/aux.55
Executable file
850
src/emacs1/aux.55
Executable file
@@ -0,0 +1,850 @@
|
||||
!* -*-TECO-*- Random autoloading functions, not used very often,
|
||||
and not providing any fundamental capability not present in EMACS :EJ.!
|
||||
|
||||
!~Filename~:! !Random functions autoloaded by standard EMACS.!
|
||||
AUX
|
||||
|
||||
!Edit Options:! !C Edit some or all of the permanent options.
|
||||
String argument is a filter for the option names -- you will be editing all
|
||||
options whose names contain the string. If you don't give a string
|
||||
argument, all options will appear for editing.
|
||||
A variable is an option if its comment starts with "*" or "*". (The variable
|
||||
name must not contain a colon.)
|
||||
When you exit the recursive edit with ^R Exit, the values are updated.
|
||||
To abort, use Abort Recursive Edit.
|
||||
If you are only editing a few options, only part of the screen will be used,
|
||||
to reduce the amount of redisplay upon exit.
|
||||
The format of the table is fairly obvious; type HELP to get details.!
|
||||
|
||||
[0[1[2[3[4[9 1,fPattern:_u9 fq9"e 0u9'!* 9: STRARG, filter, which if null!
|
||||
!* means to match any option so we set!
|
||||
!* it to 0 for quick testing and to!
|
||||
!* avoid searches.!
|
||||
|
||||
0[..f !* No buffer hacking allowed.!
|
||||
[..j !* Save mode line.!
|
||||
f[Lines f[Window f[BBind !* Temporary buffer. fsWindow is saved since we!
|
||||
!* dont use the whole screen if we dont have to,!
|
||||
!* and we want to ensure that redisplay on return!
|
||||
!* is minimized.!
|
||||
|
||||
q:..q(0)u3 !* 3: no. of elements per ..Q entry!
|
||||
1-q3u0 !* 0: ..Q index.!
|
||||
|
||||
!* Critical efficiency iteration coming up here -- there may be an awful lot!
|
||||
!* of variables to consider. We use Excl < Excl > instead of nested conditionals!
|
||||
!* since they are fast and we want to keep the size of the conditionals down!
|
||||
!* since Teco has to slowly skip over them, not cacheing them for instance.!
|
||||
|
||||
q9"n 0s9' !* Set the filtering search default,!
|
||||
!* if one, outside the loop.!
|
||||
|
||||
-(fq..q-5/(q:..q(0)*5))u2 !* 2: Iteration count. Cant give it!
|
||||
!* to the iteration directly since we!
|
||||
!* want to use Excl < Excl >.!
|
||||
< %2; !* Iterate over ..Q symbol table.!
|
||||
q0+q3u0 !* 0: up to next symbol entry.!
|
||||
q:..q(q0+2)u4 fq4-2"l !<!>' !* Comment too short -- not option.!
|
||||
0:g4-*"n 1:g4-*"n !<!>'' !* To be an option either 1st or 2nd!
|
||||
!* character of comment must be a *.!
|
||||
|
||||
!* We have an option variable. See if it passes through the filter.!
|
||||
|
||||
.(g:..q(q0))j !* Insert its name.!
|
||||
q9"n :s"e .,zk !<!>'' !* If name doesnt match filter, skip!
|
||||
!* it.!
|
||||
|
||||
!* This is a matching option.!
|
||||
|
||||
zj i: !* End name with colon, tab.!
|
||||
q:..q(q0+1)u1 fq1:"l 34i .(g1)j !* String, put in quote and the string.!
|
||||
< @:f"l .-z; 29i c > !'! 34i' !* Quote any ^]s or!
|
||||
!* double-quotes with ^].!
|
||||
"# q1\' !* Number, just get it.!
|
||||
i
|
||||
.u1 9i g4 !* Get comment, indented, on next line.!
|
||||
q1j 1a-!"e d @:f!l .,zk' !* If varMacro, ignore the teco code.!
|
||||
q1j :l .,zk !* But just the 1st line of comment.!
|
||||
!* (Most will actually be only one line!
|
||||
!* anyway.)!
|
||||
i
|
||||
!* End the comment line.!
|
||||
>
|
||||
|
||||
!* Option table of either all or just the matching options is now prepared.!
|
||||
|
||||
:i..jEdit_Options !* Mode line for recursive edit.!
|
||||
m.m&_Edit_Options_Helpf[HelpMacro !* Help for recursive edit format details.!
|
||||
|
||||
0u0 j <l .-z; %0w> !* 0: Total number of lines needed.!
|
||||
fsLinesu1 q1"e fsHeight-(fsEchoLines)-1u1' !* 1: current fsLines!
|
||||
q0+2-q1"l q0+2fsLines' !* Set fsLines so that only the amount!
|
||||
!* of screen needed is used, reducing!
|
||||
!* redisplay of rest of buffer.!
|
||||
|
||||
j 0u..H !* Into , allowing redisplay.!
|
||||
|
||||
|
||||
!* Now change the values: !
|
||||
|
||||
128*5,32:i*[..D !* ..D: Make a syntax table for parsing!
|
||||
!* the string values.!
|
||||
*5:f..D_/ !* ..D: Thinks ^] is a Lisp escape.!
|
||||
"*5:f..D_| !'! !* ..D: Thinks dquote is string delimiter.!
|
||||
|
||||
j
|
||||
< 0,1af _:"l l !<!>' .-z; !* Skip any indented lines.!
|
||||
.,(:s:;).-1x1 !* 1: Variable name.!
|
||||
q1u3 !* 3: Get this options current value.!
|
||||
@f _l !* Skip over indentation to value.!
|
||||
1a-34"n :\u2 !* 2: Numeric value.!
|
||||
q2-q3"n q2u1'' !* Reset the option iff its value has!
|
||||
!* changed. This is just in case there!
|
||||
!* is a variable macro attached -- no!
|
||||
!* sense calling it if no change.!
|
||||
|
||||
"# .+1,(@fll).-1x2 !* 2: String value except that it has!
|
||||
!* ^]-quoted dquotes inside.!
|
||||
@:i2"2" !''! !* 2: Now the exact string value.!
|
||||
|
||||
!* Note that this is why we use ^] as!
|
||||
!* the quoting character -- the!
|
||||
!* delimited Teco insert respects!
|
||||
!* superquoting, namely ^]^] and ^]dquote.!
|
||||
q3fp"l q2u1' !* Was a number before -- reset to new string.!
|
||||
"# f=23"n q2u1''' !* Was a different string before -- reset.!
|
||||
|
||||
l > !* On to next option.!
|
||||
|
||||
!* Now all the variables are changed.!
|
||||
|
||||
!& Edit Options Help:! !S fsHelpMacro for MM Edit Options.!
|
||||
!* Q-reg 9 has the string used to filter the option names.!
|
||||
|
||||
fsLinesf"n-5"l !* Good to have at least 5 lines for!
|
||||
!* this message, especially details.!
|
||||
5fsLines''w !* Dont bind, so when exit redisplay!
|
||||
!* doesnt keep part of message.!
|
||||
|
||||
:ftYou_are_editing_a_table_of_all_the_permanent_EMACS_options !* Start HELP.!
|
||||
q9"n f=9"n ft
|
||||
whose_names_contain_"9" !''!'' !* Tailor it a bit.!
|
||||
ft.
|
||||
When_you_exit,_via_ !* Now find out what the exiter is.!
|
||||
2,(33.fs^RInit)m(m.mWhere_Is)"e ftM-X_^R_Exit' !* (This is like using ^R Exit\!
|
||||
!* in documentation for a command.)!
|
||||
ft,_the_options_left_in_the_buffer_will_be
|
||||
reset.__You_can_abort_with_
|
||||
2,(m.mAbort_Recursive_Edit)m(m.mWhere_Is)"e ftM-X_Abort_Recursive_Edit'
|
||||
ft.
|
||||
Do_you_wish_to_see_details_about_the_option_table_format?
|
||||
|
||||
m(m.m&_Yes_or_No)"e 0u..h ' !* User doesnt want to see it. Clear!
|
||||
!* ..H so typeout goes away.!
|
||||
|
||||
0fsLinesw !* For full details, always use whole!
|
||||
!* screen so not MOREing a lot.!
|
||||
|
||||
:ftThe_format_of_the_table_is_simple:__each_option_name_is_followed_by_a_colon,
|
||||
some_indentation,_the_value,_and_then_on_the_next_line_the_comment_(which_is
|
||||
indented_--_any_indented_line_(if_not_inside_a_value)_is_ignored_later_when
|
||||
the_values_are_reset).
|
||||
|
||||
The_value_is_either_a_number_(with_an_optional_hyphen_preceding_it)_or_a_string
|
||||
(in_which_case_it_is_surrounded_by_double-quotes_("...")_and_may_be_more_than
|
||||
one_line_if_desired).
|
||||
|
||||
If_there_is_a_double-quote_inside_the_string,_it_must_be_quoted_by_the
|
||||
_character_(Control-]).__Any_s_inside_the_string_must_also_be_quoted_with
|
||||
.__(It's_ugly,_but_it_greatly_simplifies_the_implementation_and_these_should
|
||||
be_rare.)
|
||||
|
||||
For_instance,_consider_the_following_example_options_in_this_format:
|
||||
|
||||
Option_Number_One: "this_is_a_string"
|
||||
Null_String_Option: ""
|
||||
Option_Number_Two: -1234
|
||||
Option_Number_Three: "Quoth_the_raven:_"Nevermore!"."
|
||||
One_Bracket_Option: ""
|
||||
|
||||
|
||||
|
||||
!Edit Syntax Table:! !C Delimiter syntax table editor.
|
||||
String arg is Q-register to edit. Default is ..D.
|
||||
Response to "Character:" is ^G to quit, ^Q to quote,
|
||||
Altmode to leave the macro, or character whose entry to edit.
|
||||
When editing a character's entry, you are in overwrite mode.
|
||||
After you exit the recursive edit, you are asked for another character.
|
||||
First char in each table entry is space for delimiter, or A.
|
||||
Second is space, (, ), /, |, ', or A for lisp syntax.!
|
||||
|
||||
1,F Q-reg:[9 FQ9"E :I9..D' !* Read location of table (default is "..D").!
|
||||
FQ9-(5*200.)"N
|
||||
:I* Q9_has_wrong_length_for_a_dispatch_table FS ERR'
|
||||
f[D File ETGAZONK_.DEL !* Prevent clobberage by C-X C-W.!
|
||||
[3 0[..F !* Prevent auto-saving.!
|
||||
[..J :I..J Delimiter_Table_Editor.__
|
||||
:I*M(M.M Describe)Edit_Syntax_Table F[HELP MAC
|
||||
-1F[^R Replace !* Enter overwrite mode.!
|
||||
2F[CASEN 2F[CASE !* Convert all insertions to upper case.!
|
||||
F[B BIND G9
|
||||
J 0.U..0 40.< i^ q..0+100.i
|
||||
fssail"N 2rdic q..0f
|
||||
î"L -2d i_ q..0i''
|
||||
q..0-33."e -2d i_'
|
||||
I= 5C I _ %..0&3"E-2DI
|
||||
'
|
||||
>
|
||||
140.<I_ Q..0I I= 5C I _ %..0&3"E-2DI
|
||||
'
|
||||
>
|
||||
177.*10F^?
|
||||
FS SAIL"N 177.*10F'
|
||||
0FS MODIF F[WINDOW
|
||||
f+
|
||||
< J 0@V @FT
|
||||
Character:_
|
||||
FIU3 Q3-@; !* Exit if user types Altmode.!
|
||||
Q3-"EW' !* Quit if he types ^] or ^G (don't make the changes).!
|
||||
Q3-"EW'
|
||||
Q3-"EFIU3' !* ^Q quotes next character.!
|
||||
Q3*10J 3C !* Go to spot in buffer for the specified char.!
|
||||
>
|
||||
j 200.<3d5c2d> !* Delete the char names, leaving only edited contents.!
|
||||
0:F9 ..O !* Change contents of dispatch string to new stuff.!
|
||||
|
||||
|
||||
!Kill Some Buffers:! !C Offers to kill each buffer, one by one.
|
||||
If the buffer contains a modified file and you say to kill it,
|
||||
you are asked whether to write the file out first.!
|
||||
|
||||
0[1 [2 [3 [4
|
||||
< Q1*5-FQ.B; !* Stop after hacking all the buffers.!
|
||||
Q:.B(Q1+1!*bufnam!)U2 !* Get next buffer's name.!
|
||||
Q:.B(Q1+2!*bufvis!)U4 !* Get the name of the file it contains.!
|
||||
Q:.B(Q1+4!*bufbuf!)[..O !* Select it, TECO style, so we can check its FS MODIF!
|
||||
FT Buffer_2_
|
||||
Q4"N FT (File_4)_'
|
||||
FS Modif"N
|
||||
FT HAS_BEEN_EDITED'
|
||||
"# FT is_unmodified'
|
||||
FT .
|
||||
_Kill_it_(Y_or_N_or_^R)?
|
||||
FI:FCU3 FT3
|
||||
|
||||
Q3-"E 0[..F !* If answer is ^R, call ^R to show buffer to be killed.!
|
||||
[..J :I..JWant_to_kill_buffer_2?__
|
||||
0U..H ]..J ]..F ]..O !<!>' !* Zero ..F to prohibit buffer hacking.!
|
||||
]..O
|
||||
Q3-Y"E !* If answer is yes, kill the buffer.!
|
||||
M(M.M Kill_Buffer)2 !* Don't advance Q1 since next buffer has been moved down.!
|
||||
!<!>'
|
||||
Q1+Q:.B(Q1)U1> !* Advance to next buffer.!
|
||||
0U..H !* Cause redisplay.!
|
||||
|
||||
!Edit Tab Stops:! !C Edit the tab stops used by ^R Tab to Tab Stop.
|
||||
The bottom two lines just number the columns for your benefit.
|
||||
The first two lines, stored in Tab Stop Definitions, are meaningful.
|
||||
Periods or colons in the first line mark the tab stop columns.
|
||||
A colon means tab out with whitespace; a period means tab out by
|
||||
copying text from the second line (you must put the text there).!
|
||||
|
||||
0[..f
|
||||
:I* m(m.m Describe)Edit_Tab_Stops F[help mac
|
||||
f[b bind
|
||||
gTab_Stop_Definitions !* Push to temp. buffer holding the tab stops.!
|
||||
j 2@l .,zk !* Flush anything past two lines.!
|
||||
0@f | ||||