diff --git a/Makefile b/Makefile index e2f1ff83..97cd005f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ EMULATOR ?= simh -SRC = system syseng sysen1 sysen2 sysnet kshack dragon channa midas _teco_ emacs rms klh syshst sra mrc ksc cstacy gren bawden emacs1 _mail_ l lisp liblsp libdoc comlap lspsrc nilcom rwk inquir acount +SRC = system syseng sysen1 sysen2 sysnet kshack dragon channa midas _teco_ emacs emacs1 rms klh syshst sra mrc ksc cstacy gren bawden emacs1 _mail_ l lisp liblsp libdoc comlap lspsrc nilcom rwk inquir acount DOC = info _info_ sysdoc kshack _teco_ emacs emacs1 MINSYS = _ sys sys3 device sysbin inquir diff --git a/bin/emacs/[prfy].173 b/bin/emacs/[prfy].173 new file mode 100644 index 00000000..50c33b6b Binary files /dev/null and b/bin/emacs/[prfy].173 differ diff --git a/bin/emacs/einit.:ej b/bin/emacs/einit.:ej new file mode 100644 index 00000000..2e3265f9 Binary files /dev/null and b/bin/emacs/einit.:ej differ diff --git a/bin/emacs/emacs.:ej b/bin/emacs/emacs.:ej deleted file mode 100755 index 6f5955c5..00000000 Binary files a/bin/emacs/emacs.:ej and /dev/null differ diff --git a/bin/emacs/emacs.:ej b/bin/emacs/emacs.:ej new file mode 120000 index 00000000..bd09fa97 --- /dev/null +++ b/bin/emacs/emacs.:ej @@ -0,0 +1 @@ +emacs/[pure].> \ No newline at end of file diff --git a/bin/emacs/purify.:ej b/bin/emacs/purify.:ej new file mode 120000 index 00000000..b2376b66 --- /dev/null +++ b/bin/emacs/purify.:ej @@ -0,0 +1 @@ +emacs/[prfy].> \ No newline at end of file diff --git a/build/build.tcl b/build/build.tcl index 63a59e05..40d92236 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -214,6 +214,13 @@ respond "*" ":print sys2;..new. (udir)\r" type ":vk\r" respond "*" ":link sys2;ts emacs,emacs;ts >\r" +respond "*" ":emacs\r" +respond "EMACS Editor" "\033xrun\033einit\033? Generate\r" +expect "EINIT" +respond ":EJ" "\030\003" +respond "*" ":kill\r" +respond "*" ":delete emacs;\[prfy\] <\r" + respond "*" ":midas sysbin;_syseng;dump\r" respond "WHICH MACHINE?" "DB\r" expect ":KILL" diff --git a/src/emacs1/^rbase.374 b/src/emacs1/^rbase.374 new file mode 100755 index 00000000..8e8ddb40 Binary files /dev/null and b/src/emacs1/^rbase.374 differ diff --git a/src/emacs1/buffer.207 b/src/emacs1/buffer.207 new file mode 100755 index 00000000..d90ab494 Binary files /dev/null and b/src/emacs1/buffer.207 differ diff --git a/src/emacs1/ccl.196 b/src/emacs1/ccl.196 new file mode 100755 index 00000000..67f7f658 Binary files /dev/null and b/src/emacs1/ccl.196 differ diff --git a/src/emacs1/crl.208 b/src/emacs1/crl.208 new file mode 100755 index 00000000..ca519cb9 --- /dev/null +++ b/src/emacs1/crl.208 @@ -0,0 +1,414 @@ +!* -*-TECO-*-! +!^R Extended Command:! !^R Read an extended command from the terminal with completion. +This command reads the name of a function, with completion, +followed by the string arguments for the function. Then the +function is called. Completion is done as the function name is typed +(for more information type the HELP key while entering the name). +Follow the function name with a  and then the arguments; end with . +For customization info see the source code.! + +!* Internals: +Uses & Read Command Name and & Read Line to echo at bottom of screen. +If the variable Read Command Prompt exists it specifies the prompt string; +otherwise "MM " is used. A numeric argument is passed along to the M-X +command. The command string is saved on the minibuffer ring +so that ^R Re-execute Mini will redo it, and ^R Execute Mini +with argument will get it back for editing.! + + fsQPPtr[7 !* Save PDL ptr so cleanup before execute! + [0[1[2[5[6 !* save regs! + + :i0 ff"n !* 0: Start with null string! + ff&1"N :\u0' !* 0: Post-comma argument! + ff&2"N :\u1 :i01,0' !* 0: Pre-comma arg too! + :i00_' !* 0: Argument(s) and space! + + :i*M-X_fo..qRead_Command_Promptu2 !* get prompt string in q2! + :i1 + < 4,q1m(m.m&_Read_Command_Name)02u1u6 + fq1-1"l ' !* if empty arg or rubbed out then return! + q6&2"n :i6 1;' !* ended with CR, make null arglist.! + @:i*| :ft m(m.mDescribe)1 |f[HelpMac + !* set help macro to do describe! + q6"n @ft' !* If command name already printed, add Altmode.! + 1#q6&1,m(m.m&_Read_Line)021u6 !* read arguments! + -1fsQPUnwind !* restore help macro! + fq6; !* exit unless empty or rubbed out! + > !* keep trying! + :i10M(M.M_1)6 !* Stick MM ...  around typed command! + f1:"l !* If there is a ^] in the string,! + 1fo..qQuote_Execute_Command"n !* user want ^] quoting?! + f[BBind g1 !* yes! + j <:s; i> !* replace each one by two of them.! + hx1 f]BBind'' + f=(q:.n(0)f"e w :i*')1"n !* If this command not same as previous command,! + q.n[..o zj -5d !* push this command onto ring buffer of! + j 5,0i ]..o !* minibuffer commands.! + q1u:.n(0)' !* made room, now store it! + :m( q1(q7fs qp unwind)) !* Now execute command after restoring outer environment.! + +!^R Instant Extended Command:! !^R Run extended command; let it read its own arguments. +This command is the same as ^R Extended Command except that +it does not read any string arguments; the function itself does so. +This allows special processing such as completion to be done +on arguments which are function names or filenames.! + +!* +Internals: +Uses & Read Command Name to echo at bottom of screen. +If the variable Instant Command Prompt exists it specifies the prompt string; +otherwise "C-M-X " is used. A numeric argument is passed along to the MM +command.! + + fsQPPtr[7 [0[1 !* Save PDL ptr so cleanup before execute! + + :i0 ff"n !* 0: Start with null string! + ff&1"N :\u0' !* 0: Post-comma argument! + ff&2"N :\u1 :i01,0' !* 0: Pre-comma arg too! + :i00_' !* 0: Argument(s) and space! + + :i*C-M-X_fo..qInstant_Command_Promptu1 !* get prompt string in q1! + 9,f 01u1 + fq1:"g 0' !* if empty arg or rubbed out then return! + f:m(m.m1(q7fsQPUnwind)) !* Goto MM command! + +!& Read Command Name:! !S Read in an command name, with completion. +Rubout, ^D, ^U and ^L perform editing. Space, Altmode, and Tab do completion. +? lists choices. + +Takes a prompt-string as a following string argument. +A numeric argument is the initial contents of the string to be accumulated. +A pre-comma arg containing the "4" bit means don't wait for a confirming CR; +the "2" bit means complete over the symbol table in CRL List using the prefix +string in CRL Prefix. The "8" bit is deliberately ignored. +The "16" bit permits names that don't match. +The "32" bit means CR is allowed with an empty name. + +The F^K command with the "8" bit set in its precomma arg +calls & Read Command Name, passing along its arguments. + +Two values are returned, the second being the completed string +(or 0 if exit was due to over-rubout). +The first is bit-decoded; 1 means we displayed the string, +2 means the terminating character was Return, 4 means we terminated +without doing completion so the string might not match any alternative. + +See Source code for more info.! + +!* If the 16 bit is set in the pre-comma arg, then names +which don't match are permitted. How to specify one is +controlled by the value of CRL Non-Match Method: +2 bit: CR will terminate without performing completion +4 bit: LF will terminate without performing completion +8 bit: if user types CR and completion is not possible, + typing another CR will terminate without performing completion + (this overrides the presence of the 2 bit); also, typing + C-CR will terminate without performing completion (if your + terminal cannot generate the 9-bit character set, then you + may want to set the 4 bit also, so the you can use LF) +The default value is 2. (A value of 1 will prohibit non-matches +in ALL cases.) + +CRL Name Lister can (if not zero) contain a function for use +in assembling the list of matching items, for "?". +This function is used as follows: + + (1) For each name to display, the function is called with no + pre-comma arg, and a post-comma arg which is an index into CRL + List (which can be found in Q.1). The function should insert + information about that name into the buffer beginning at + point, and include a CRLF at the end. + + (2) The function is called with a pre-comma arg of 1, with the + buffer containing all the names. The entire buffer will be + displayed after the function returns. (Some things it can do: + sort the names, insert a heading, etc.) + +If the variable CRL Name Type is nonzero, it should contain +a string such as "buffer" which fits in the slot: +"You are entering a name..." +It is used in help messages. + +If the variable CRL Help is nonzero, it is printed +after the regular help message is given. +*! + + [0[1[2[3[4[5[6[7 !* save regs! + 1F[^P CASE !* Ignore case when sorting! + :I6 !* Read prompt string argument! + 0[8 !* Q8 is nonzero if we are echoing.! + 0[9 !* Q9 is nonzero => type altmode after completed name.! + q..q[.1 :i*MM_[.2 !* Q.1 and Q.2 for normal case of MM-command completion --! + !* use standard symbol table and "MM " prefix to select! + !* only the MM-variables.! + + 0[.0 !* Q.0 contains whether and how to allow non-matches.! + &20."n 2fo..Q CRL_Non-match_Methodu.0 + q.0&8 "n q.0&777777777775.u.0 '' + + &2"n qCRL_Listu.1 !* Q.1 has the symbol table to complete over.! + 0fo..qCRL_Prefixu.2 !* Q.2 has the prefix string -- only variables starting! + q.2"e :i.2'' !* with that are considered, and the returned name does! + !* not include the prefix string.! + + 0[.3 !* Q.3 = number of chars not to erase & reprint! + !* when completion occurs (already complete & verified)! + 0[.4 !* Number of chars of name printed.! + 0f[HelpMacro !* Help character should be seen be FI! + f[BBind fq()"g g()' !* Make temp buffer to accumulate command name in.! + q..ou5 + o Read + + !Redisp! + 1u8 + :i*CfsEchoDis !* Clear echo area! + fs rgetty"e @ft +' + @ft6 @ht !* Retype prompt string and input! + zu.4 + o Read + + !BarfCR! !* Here if cannot complete and user! + !* typed CR! + fg !* Type bell.! + fs rgetty"n @ft_' !* Force cursor back to echo area on ITS.! + q8"n @ft' !* type altmode to inform user! + Q.0&8 "N !* if 8-bit of CRL Non-Match Method is set! + :FI-î "E FIW !* and user types another CR,! + q8 "N @FT +' + q8+6,(hx*) '' !* returns with what user typed! + o Redisp !* otherwise flush altmode! + + !Barf! !* Here if tried to complete and no match! + fg !* and that is not allowed. Type bell.! + fs rgetty"n @ft_' !* Force cursor back to echo area on ITS.! + o Read + + !Changed! !* Come here when completion augments the string.! + q8"n !* If we have started printing,! + fs rgetty"n + q.4-q.3< :i*X fs echo dis > !* Reprint any chars that weren'r verified! + q.3,z@t' !* and print new ones.! + "# q.4,z@t' !* On printing tty, just print new ones.! + zu.4' + zu.3 !* All chars we have are verified, even if not printed.! +!* If name is fully complete, think about exiting.! + q9"n &4"n !* If pre-comma arg has the 4 bit, return completed name.! + q8,q3' + q8"n @ft 0u9 !* If waiting for CR with completed string, type an! + :fi-13"n o Redisp''' !* altmode, but if next char isn't cr, flush the Alt.! +!Read! + q8"e 0:"e o Redisp'' + @:fiu0 q0-4110."e oHELP' !* Handle HELP! + q0-(200.+î) "e fiw !* Handle C-CR! + q.0&8 "n !* return immediately! + q8 "n @FT !* echo return! + ' + q8+4,(HX*)'' + fiu0 + q0-32"e ."e o Read'' !* Ignore initial spaces.! + q0f Š_? "l !* Not a special character! + q0- "e Q.0&4 "n !* LF typed so return immediately! + q8+4,(HX*) '' + q0-"e fiu0' !*  quotes the next character! + q0i !* Add char to buffer.! + q8"n fs^RMode"n -1@t %.4 '' !* Echo if in ^R mode! + oRead' !* back for more! + q0-"e !* Turn ^R into ^ and R.! + i^ R + q8"n fs ^RMode"n -2@t %.4 %.4'' + oRead' + q0-177."e !* Rubout?! + q8"e q0fsReRead oRedisp' + z"e q8,0 ' !* Rubout when string empty returns 0.! + zj 0au0 -d !* Put char being rubbed in Q0, and remove from buffer.! + fsrgetty"e @ft0 ' !* Type character if cannot erase! + "# q0-40."l oRedisp' !* Erase if possible! + :i*X fs echodis + Q.4-1u.4 + q.4-q.3"l q.4u.3' + oRead'' + q0- "e oRedisp' !* ^L redisplays the current string! + q0f:"l hk 0u.3 oRedisp' !* ^D and ^U flush input and reprompt.! + q0-?"e !* Help requested?! + &2"e !* Completing over MM-commands, so load BARE.! + f=(0,2:g5)^R"e !* Must do it befor the F[BBIND.! + m(m.m &_Load_Bare)'' + + f[BBind :ft !* Get buffer to mess with! + + &2"e !* Completing over MM-commands, so look thru libraries.! + fs :ej page*5120+400000000000.u7 !* ptr to 1st file! + < fq7:; + g(q7m.m~DIRECTORY~) !* get directory for file! + q7+4+fq7u7 !* ptr to next file! + > + j .u3 i + + < 2r :s +5; 0l q3,.k l !* save command name! + .-z; .u3 0:l + > q3,zk' !* Done mapping down library space.! + + !* Now pick out possibles from the symbol table.! + + :fo.1.25,0fu3 !* Q3: index to first match in symbol table.! + :fo.1.25›,0fu4 !* Q4: index to last match in symbol table.! + q4-q3/q:.1(0) < !* iterate over all matches in symbol table.! + 0fo..q CRL_Name_Listeru7 + q7"n q3m7' !* Either call user's routine! + "# !* or do the standard thing.! + q:.1(q3)u7 !* Q7: Matching symbol name! + fq.2,fq7g7 i + ' !* insert variable name! + + q3+q:.1(0)u3 !* next match in symbol table! + > + + j + &2"e < :s~; 0lk>' !* Don't mention functions with ~ in their names.! + 0fo..q CRL_Name_Listeru7 + q7"n 1,m7' !* Either call user's routine! + "# +   l   !* or sort list,! + j < .-z; x1 l < .-z; 1f=1"N 1;' k > > !* remove duplicates! + ' + + ft Here_are_the_possible_completions_of_what_you_have_typed: + + ht 0fsflushedw f]BBind !* Type the matching commands! + 0u..h f oRedisp' + +!*** Character typed is space or altmode or CR.! + !Retry! + + q0-î"e !* if CR, see if we should return without! + !* doing completion. return if...! + (Q.0&2"'n)( !* 2-bit of CRL Non-Match Method is set or...! + )  ((z"'e)&(&40."'n)) "n !* empty name and 32-bit of arg is set! + q8"n @FT + ' + Q8+6,(HX*) '' + + &2"e z-1"e 0a:fcfLVKEIW:"l !* Hack one-letter abbreviations if want MM-name.! + h@fc + f~5L"e i ist_' + f~5V"e i iew_' + f~5K"e i ill_' + f~5E"e i dit_' + f~5I"e i nsert_' + f~5W"e i hat_' + o Changed''' !* Done hacking one-letter abbreviations.! + + :i3 :i4› !* Q3 has the largest thing we abbreviate! + !* Q4 has the smallest! + :fo.1.25,0fu1 !* get offset of the smallest symbol! + fq.1/5-q1"g q:.1(q1)u2 !* whose name we abbreviate! + f~2.2,0f-fq.2"g fq.2,fq2:g2u4'' !* and use it as smallest! + :fo.1.25›,0fu1 !* get offset of the largest symbol! + q1-1"g q:.1(q1-q:.1(0))u2 !* whose name we abbreviate! + f~2.2,0f-fq.2"g fq.2,fq2:g2u3'' !* and use as largest! + + &2"e !* Now map down library space if we want an MM-command.! + f=(0,2:g5)^R"e !* If name starts with ^R, make built-in functions avail.! + m(m.m &_Load_Bare)' + fs :ej page*5120+400000000000.u7 !* ptr to 1st file! + f[BBind !* get temp. buffer to do G's into! + < fq7:; !* exit if no more files! + q7+8+fq(q7+4)u2 !* ptr to FO table of file! + :fo25,0f*5u1 + fq2-q1"g + q1,q1+5g2 !* If smallest thing we abbreviate in this file! + .-5fsword+q2u1 !* is smaller than smallest so far, it is new smallest! + f~14"l q1u4'' + :fo25›,0f*5u1 + q1-14"g + q1-10,q1-5g2 !* Same for largest thing we abbreviate in this file! + .-5fsword+q2u1 + f~13"g q1u3'' + hk q7+4+fq7u7 !* ptr to next file! + > f]BBind' + + f~34u1 !* get no. of chars of A and B that match! + q1"l !* if smallest > largest then no match.! + (&20."'e)(q0-32"'n) "n + q0-î "E o BarfCR' "# o Barf '' + + :i7 q7u2' !* but that is ok if non-match ok! + !* and user typed a space! + "# q3u7 q1"n 0,q1-1:g3u7' !* q7 gets common initial segment of q3 and q4.! + z,fq7:g7u2' !* Q2 gets that, minus the chars we already have.! + q0-î"e fq4-fq7"e q4u3 0u1'' !* CR: if smallest is initial seg of biggest,! + !* regard it as a full completion.! + q0-32"e !* Space: complete only the first word.! + fq2"e q1"n !* if not exact match, but no completion possible,! + 0,0a-32"e oBarf' !* barf if second space in a row.! + 32i q8"n @ft_ %.4' oRead'' !* but allow one space to be forced in.! + 32f2+1u2 q2"g !* Space and completion is possible: stop! + 0,z+q2:g7u7'' !* at first space.! + "# fq2"e q1"n + fq4-z"n !* Not space and ambiguous => barf unless exact match.! + q0-î "e oBarfCR' + "# oBarf'' + q4u3''' !* Exact match => regard as fully completed.! + f~34"e fq3-fq7"e !* Entire name has been completed.! + q0-î"e q8"n @ft +' 2+q8,(:i*3)' !* If char typed is CR, return completed name.! + !* Copy the name, in case it comes from BARE.! + 1u9'' !* Otherwise, say name is complete.! + hkg7 o Changed !* Stick in completed text, maybe redisplay, continue.! + + !HELP! + fiw :ftYou_are_typing_in_ + &2"e ftthe_name_of_an_EMACS_extended_command !* Normal MM-name completion.! + :i7_command' + "# 0fo..q CRL_Name_Typeu7 !* Completion over some arbitrary list.! + fq7"g :I7_7 ' + "# :I7 ' + ft a7_name ' + ft. +Use_Rubout_to_delete_previous_characters;_use__to_delete_the_whole_thing. +Typing_Space_or_Altmode_causes_as_much_of_the_name_as_possible_to_be +filled_in_for_you_(this_is_called_completion). +Type_?_to_list_all_the7_names_which_match_what_you_have_typed. + + &6-4"e ft !* no CR required and completing! + !* over command names; assume that! + !* this was called from M-X! +If_completion_fills_in_the_entire7_name_an_Altmode_()_appears. +__You_can_then_start_typing_the_arguments_to_the_command. +__Terminate_them_with_a_Return.__If_there_are_no_arguments, +__you_can_use_just_Return_after_a_sufficient_abbreviation.' + + "# ft +If_completion_fills_in_the_entire7_name,_ + &4"e !* CR required! +ft an_Altmode_()_appears. ' + "# !* no CR required! +ft it_will_be_chosen. ' + + Q.0&2"e ft !* CR completes! +Typing_Return_will_complete_the7_name_and_terminate. + &40."n ft !* also null entry allowed! +__You_may_also_type_Return_if_there_are_no_other_characters, +__to_enter_a_null7_name '' + + Q.0&8 "n ft !* 2 CR's does complete! +If_completion_is_not_possible_after_typing_Return,_typing_a_second +Return_will_terminate_the7_name,_without_completion. (An_altmode +will_appear_after_you_type_the_first_Return,_as_a_reminder.) ' + + "# ft !* CR doesn't complete! +Typing_Return_will_terminate_the7_name,_without_completion. ' + + Q.0&4 "n ft !* LF doesn't complete! +Typing_Linefeed_will_terminate_the7_name,_without_completion. ' + + 0fo..q CRL_HelpU7 !* more help info! + q7"n FT +7 '' + + FT + + 0u..h f oRedisp diff --git a/src/emacs1/doc.160 b/src/emacs1/doc.160 new file mode 100755 index 00000000..5c29fa90 Binary files /dev/null and b/src/emacs1/doc.160 differ diff --git a/src/emacs1/einit.272 b/src/emacs1/einit.272 new file mode 100755 index 00000000..5ad13f37 Binary files /dev/null and b/src/emacs1/einit.272 differ diff --git a/src/emacs1/files.434 b/src/emacs1/files.434 new file mode 100755 index 00000000..4380d54a Binary files /dev/null and b/src/emacs1/files.434 differ diff --git a/src/emacs1/indent.238 b/src/emacs1/indent.238 new file mode 100755 index 00000000..d80e60f9 Binary files /dev/null and b/src/emacs1/indent.238 differ diff --git a/src/emacs1/isearc.74 b/src/emacs1/isearc.74 new file mode 100755 index 00000000..e3ace36a --- /dev/null +++ b/src/emacs1/isearc.74 @@ -0,0 +1,232 @@ +!* -*-TECO-*-! + +!^R Incremental Search:! !^R Search for character string as you type it. +C-Q quotes special characters. Rubout cancels last character. +C-S repeats the search, forward, and C-R repeats it backward. +C-R or C-S with search string empty changes the direction of search +or brings back search string from previous search. +Altmode exits the search; with search string empty +it switches to non-incremental ^R String Search. +Other Control and Meta chars exit the search and then are executed. +If not all the input string can be found, the rest is not discarded. +You can rub it out, discard it all with C-G, exit, +or use C-R or C-S to search the other way. +Quitting a successful search aborts the search and moves point back; +quitting a failing search just discards whatever input wasn't found. +On printing terminals, C-L types line found but doesn't exit the search.! + + [D !* QD is direction and # times to search.! + 0[L !* QL > 0 iff failed to find current search string,! + 10.[R !* QR is state register: ! + !* 40. => ^R or ^S repeating search or gobbling default.! + !* 10. => just starting.! + !* 4 => printing char just read.! + !* 2 => rubout just done wants full redisplay.! + !* 1 => rubout just done.! + + [Q @:iQ` !* MQ pushes current info: ., qL, q2, q0, qD.! + q4+1*5-fq3"e !* We are going to push in q3, so make sure space exists.! + q3[..o zj + 200,0i ]..o' + .u:3(%4) !* Push point, search string,! + qLu:3(%4) + q2u:3(%4) + q0u:3(%4) !* this character, and current direction of search.! + qDu:3(%4) + ` + + [T + fs tyi sourc"e + @:iT` !* MT updates the echo area.! + Q9-Q.9"N 2[R' Q9U.9 !* Q9 holds prompt for echo area. Redisplay if changed.! + fs rgetty"n 2&qR"n !* If we need to redisplay the whole thing,! + qc fs echo dis !* home up and clear line first,! + @ft 9:_ q2u8'' !* then type the prompt and decide to retype whole string.! + @ft 8 :i8  !* Update displayed search string.! + ` ' + "# :iT' !* Don't display if inside a macro.! + + [C :IC TL !* QC has string to home up in echo area and clear line.! + [0 !* Q0 holds type-in character being processed.! + [2 :i2 !* Q2 holds accumulated search string.! + [8 :i8 !* Q8 has accumulated stuff to type in echo area.! + [9 !* Q9 has [Failing ][Reverse ]Search for echo area.! + 0[.9 !* Q.9 has last value of Q9 actually displayed.! + 1fo..qSearch_Exit_Option !* QE nonzero => random control chars exit.! + 200fs q vector [3 !* Q3 holds stack for partial search strings.! + -1[4 !* Q4 is stack pointer.! + [5 !* Q5 is random temp.! + .[P !* QP has old point (to maybe push at end).! + [S :IS M.M&_Isearch_RuboutUS :MS !* QS has & Isearch Rubout (autoloading)! + :I* M(M.M&_Isearch_Help) F[Help Mac + 1f[noquit + [6 [7 !* Q6 and Q7 are the success and failure echo strings.! + qD"g :i6I-Search :i7Failing_I-Search' + qD"l :i6Reverse_I-Search :i7Failing_Reverse_I-Search' + q6u9 !* Search starts out successful.! + + 0[I !* QI is nonzero when we are reading input.! + + fs rgetty"e + fs tyi sourc"e @ft _S:_' !* On printing tty, start typing out.! + 1fstypeo'' + + !Restart! + + 1:< 1uI -2f[noquit !* Set up an errset to catch quits.! + < qL"e q6' "# q7'u9 q9-q.9"n mt' !* Display direction and status in echo area.! + 0@V 1uI :fiu0 0uI @fiu5 + q5fs^r indir-qSearch_Exit_Char"e fq2:@; + ! 0fsnoquitw qD:m(m.m ^R_String_Search)' + q5-8"e o Funny' + q5-176."g o Funny' + q5-"e o Control' !* If Altmode isn't the exit char, it's like a ctl char! + q5-î"e  FS REREAD' + + !Normal! + + 4uR !* Handle printing char.! + mQ !* Push ., qL, q2, q0 and qD into q3, for rubbing out.! + :i2 2 0 !* stick this char at end of search string,! + fs tyi source"e !* If not inside a keyboard macro,! + fq8"n mt' !* Update the display.! + @ft 0 + "# + + !Try! !* Note if fall through we are inside a failing conditional.! + + mt !* Update the displayed search string.! + '' + qL"n !' !* No point in searching if know it would fail.! + + .u5 + 40.&qR"e !* For ^S, ^R suppress the moving back so don't no-op.! + qD"g fq2-1r' !* Move back, so that from FO/\O we find the FOO.! + "# fsz-qP f[ vz + fq2-1"g fq2:c"e zj'' + f]vz'' !* After finding FO backwd, move fwd 3 so can find FOO.! + qD:s2"l !' + q5j 1uL fg ! !* But if search fails, undo that motion back.! + + !Funny! + + q5-177."e o Rubout' + !* Only control characters and backspace get past here.! + q5&537.-S"e o Forward' !* Check for C-S and C-s (ignore case bit).! + q5&537.-R"e o Backward' !* Note: mustn't change q5 since Control rereads it.! + q5&537.-Q"e o Quote' + q5&537.-L"e fs rgetty"e o Reprint' o Control' + qE"e o normal' + o Control + + !Reprint! !* ^L on printing tty prints current line.! + 0t ft..a t + ft _S:_2 !* Then re-prompt.! + ! + + !Quote! !* ^Q quotes the next character.! + + 1f[noquit + fs osteco"n -1f[helpch' + fiu0 + fs osteco"n f]helpch' + 0fs quitw f]noquit + o normal + + !Forward! !* ^S means search again forward.! + + qD"l :i6I-Search :i7Failing_I-Search' + q4"L qD"g o Default' !* ^S as 1st char going fwd => gobble default string.! + "# 1uD !'' !* ^S as 1st char, going backward, changed to fwd.! + mQ !* Push ., qL, q2, q0 and qD into q3.! + qD"L 0uL' !* If reversing direction, don't assume search will fail.! + 1uD !* String not null: make sure going fwd,! + 40.uR !* Mark us as a ^S so don't change search string,! + o try !* just search for it a second time.! + + !Backward! !* ^R means search again backward.! + + qD"g :i6Reverse_I-Search :i7Failing_Reverse_I-Search' + q4"L qD"l o Default' !* ^R as 1st char going backwd => gobble default string.! + "# -1uD !'' !* ^R as 1st char, going forward, changed to backwd.! + mQ !* Push ., qL, q2, q0 and qD into q3.! + qD"g 0uL' !* If reversing direction, don't assume search will fail.! + -1uD !* String not null: make sure going backwd,! + 40.uR !* Mark us as a ^R so don't change search string,! + o try + + !Default! !* Come here to use default search string.! + + mQ !* Push current state so can rub the default out.! + qSearch_Default_Ring[..o !* Find the default! + .fs word u2 ]..o !* and gobble it.! + fq2"l :i2' + q2u8 + 40.uR !* Inhibit moving back before starting to search.! + o try + + !Rubout! + + q4"l fg !' !* Rubout when string is empty does nothing.! + ms !* Call & Isearch Rubout.! + qL"e q6' "# q7'u9 !* Fix displayed direction and status for echo area.! + mt ! !* Redisplay and loop back.! + + !Control! + + q5 fs reread + 0; + + > + f]noquit + >u0 @feqit-q0"e @fg !* If we quit, record in journal file.! + !* Record Rubout if quit while searching,! + !* record :^G if failing or waiting for input.! + qL"'gqI"N :i*:' "# :i*_›' fsjrn wr + QL"g mt !* If failing, rub out the unfound chars and restart.! + o Restart' + qI"e ms mt o Restart' !* If quit while actually searching, restart.! + QPJ 0fsnoquit + -1fsquit' !* If succeeding, restore starting point and quit.! + q0f"n fs err' !* Error not a quit => pass it on.! + + fq2"g + qSearch_Default_Ring [..o !* New search char, save prev default.! + fq(.fsword)-1"G 5c .-z"e j'' !* If previous default is worth saving, push it! + q2,.fsword !* Store current (new) default! + ]..o' + + fs tyi source"e @ft  ' !* Echo an altmode to show we have exited.! + qP mMM_&_Maybe_Push_Point !* Maybe leave mark at place search started.! + 0 + +!^R Reverse Search:! !^R Incremental Search Backwards. +Like ^R Incremental Search but in reverse.! + -@:M( M.M ^R_Incremental_Search) + +!& Isearch Rubout:! !S Rubout-handling subroutine for incremental search.! +!* Kept in QS during incremental search.! +!* Assumes that there is something to rub out (so check first).! + + qD( + q:3(q4)uD !* Else pop last set of pushed info! + )-qD"N !* If popping a ^R or ^S that reversed direction,! + qD"g :i6I-Search :i7Failing_I-Search' !* fix up displayed mode.! + qD"l :i6Reverse_I-Search :i7Failing_Reverse_I-Search'' + q:3(q4-1)u0 + q:3(q4-2)u2 + q:3(q4-3)uL + q:3(q4-4)j !* restore point saved by popped char.! + q4-5u4 + 3uR + fs tyi source"e !* No display inside keyboard macros.! + fs rgetty"e q0:i8' !* On printing tty, rub out char by typing it.! + "# Q0-_:"L Q0-¢L !* On display, redisplay whole search string! + 1uR :I*X FS ECHO DISP'''' !* unless we can fix it up! + q0-12."e q4"g q:3(q4-1)-15."e !* If we just rubbed a LF that has a CR before it,! + :ms''' !* Rub out that CR too.! + +!& Isearch Help:! !S FS Help Mac calls this, inside I-search.! + + m(m.m Describe)^R_Incremental_Search + 0u..h f diff --git a/src/emacs1/purify.127 b/src/emacs1/purify.127 new file mode 100755 index 00000000..8ac85c4d Binary files /dev/null and b/src/emacs1/purify.127 differ diff --git a/src/emacs1/search.52 b/src/emacs1/search.52 new file mode 100755 index 00000000..0c3366f4 --- /dev/null +++ b/src/emacs1/search.52 @@ -0,0 +1,180 @@ +!* -*-TECO-*- ! + +!^R Character Search:! !^R Search for a single character. +Special Characters: + ^A Call ^R String Search; use M-X Describe to see what that does. + ^F Position window so search object is near top + ^Q Quote following character + ^R Reverse search direction and read another char + ^S Search for default + Also done if character the macro was called by is typed again, + overides any other function of that character shown here. + ^T Search for Teco default +If ^S is not used, the character typed becomes the default +for future searches. The previous default is saved on a "ring", +unless it was only one character.! + + [0 [1[2 0[3 [9 +!RDCH! M.I @:FIU0 !* Q0 gets 12-bit command char! + FIU9 !* Q9 gets actual ascii char! + Q0-(FS^RLAST)"E 323.U0' !* If repeat char called by, treat as ^S.! + Q0:FCU0 !* Uppercase char! + Q0-301."E !* ^A call other macro.! + Q1:M(M.M^R_String_Search)' + Q0-306."E 1u3 oRDCH ' !* ^F set flag to bring to top! + Q0-321."E M.I FIU9 ' !* ^Q read another character, don't check for special.! + Q0-322."E -Q1U1 ORDCH ' !* ^R reverse direction and read another.! + Q0-323."E F[S STRING !* ^S use default.! + QSearch_Default_Ring[..O + .FSWORDFSS STRING ]..O + OSEARCH ' + Q0-324."N !* ^T use teco default. Otherwise,! + F[S STRING 0S9 ' !* normal character, compile search for it.! + QSearch_Default_Ring [..O !* New search char, save prev default.! + FQ(.FSWORD)-1"G 5C .-Z"E J '' !* If previous default is worth saving, push it! + FSS STRING,.FSWORD ]..O !* Store current (new) default! +!SEARCH! + .U0 Q1:S"E FG 1  ' !* Do the search, ding if error ! + Q0M(M.M&_Maybe_Push_Point) !* Maybe remember where we came from.! + q3"N :f !* ^F search, adjust window! + 2fo..Q Next_Screen_Context_Lines :@f ' + 1  + +!^R Reverse Character Search:! !^R Search backwards for a single character. +g(m.m~DOC~ ^R Character Search)jk! + +-:M(m.m ^R_Character_Search ) + +!^R String Search:! !^R Search for a character string. +Reads string in echo area. Special characters: + ^B Start search from beginning of buffer. + ^D Yank in a default off of search default ring, + popping it. Flushes any previous type-in. + ^E Start from end of buffer. + ^F Position window so search object is near top + ^L Redisplay. + ^Q Quote next character. + ^R Reverse direction. + ^S Search then return to read in loop. + ^T Yank in the Teco default. + ^U Flush string so far. + ^V Find string only if surrounded by delimiters. + ^W Word search (ignore any white space between words) + ^Y ^D with no pop and no flush. +  Search then exit to ^R mode, whether succeed or fail + Rubout Delete last character of search string. + +If you search for the null string, the default is used. +Otherwise, the new string becomes the default and the old +default is saved on a ring, unless it is only one character.! + + [0 [8 [9 0[3 !* Q3 ^S/$ flag, non-zero if search done! + [1 !* Q1 search direction and count! + 0[5 .[6 !* Q5 0 normal, -1 BJ, 1 ZJ; Q6 starting place! + 0[.3 0[.4 0[.5 !* Q.3 0 normal, 1 ^F search, Q.4! + !* word search, Q.5 ^V search! + Q..O[4 !* Q4 main buffer! + fsB Cons[2 @fn/Q2 fs B Kill/ [..O !* Q2 buffer to read search string into ! + !* Can't use f[bbind because it bites the KCB.! + 0[7 !* Q7 number of ^PX's to adjust display.! + F 0U7 ' !* 0U7 assumes complete redisplay will be needed! + < Q4U..O fsListen"E 0@v'q2U..O !* keep blinker up top! + @:fi:fcu0 fiu9 !* Q0 gets 12-bit upper-case char, q9 gets real char! + q0-33."E q9fsEchoOut + q3"n f;EXIT' !*  if just after ^S, exit! + f;SEARCH ' !* Otherwise, go search! + q0-177."L q9i q9fsEchoOut !* ordinary character, echo and handle quickly! + 0u3 q0-î"e  i' !' !* Follow a CR with an LF. Exit iteration quickly.! + q0-302."E -1u5 0u3 1u1 0; ' !* ^B BJ before search! + q0-304."E HK 0U3 !* ^D yank in new default and pop! + QSearch_Default_Ring[..O + .FSWORDu0 ."E ZJ ' 5R + ]..O g0 0; ' !* then redisplay! + q0-305."E 1u5 0u3 -1u1 0; ' !* ^E ZJ before search, implies reverse also! + q0-306."E 1-q.3u.3 0; ' !* ^F use 0FS % CENTER$ for window (complement switch)! + q0-314.@; !* ^L redisplay search string! + q0-321."E @ft FIU9 ' !* ^Q read another char, don't check for special! + q0-322."E -q1u1 0u3 0; ' !* ^R reverse search direction, redisplay! + q0-323."E @ft 1u3 2u7 !* ^S try a search, Q3 suppresses exit from macro! + f;SEARCH ' !* after search completes, 2U7 will erase the ^S ! + q0-324."E HK 0U3 !* ^T yank in the teco default ! + g(fsS String) 0; ' !* and redisplay! + q0-325."E HK 0;' !* ^U flushes current string! + q0-326."E 1-q.5u.5 0; ' !* ^V complement delimited-search mode! + q0-327."E 1-q.4u.4 0; ' !* ^W complement word-search mode! + q0-331."E 0u3 !* ^Y insert default! + QSearch_Default_Ring[..O + .FSWORDu0 ]..O g0 0; ' !* then redisplay! + q0-177."E 0u3 !* Rubout, delete a char, 0u3 to flag change! + Z"N fsrgetty"E 0afsEchoOutw -D !' + 0A-37."G 0a-177"N 1U7 '' !* Try not to use complete redisplay ! + -D ' 0; ' !* and run back through redisplay routine! + 0u3 q9i q9fsEchoOut ' !* non rubout non special insert it,! + > > !* 0u3 flags change, already echoed courtesy of M.I! + Z"N 0S..O ' !* Compile the new search string, if any! + Z( QSearch_Default_Ringu..O !* New search char, save prev default.! + )"N !* If using old default, don't repush! + FQ(.FSWORD)-1"G 5C .-Z"E J ''!* If previous default is worth saving, push it! + FSS STRING,.FSWORD ' !* Store current (new) default! + "# .FSWORDFSS STRING ' !* Using old default, get it! + Q4U..O .U8 FN Q8J !* Remember where we were, go back if ^G out! + Q5"L BJ ' Q5"G ZJ ' !* Get to starting place for search! + q.5"n q1"l -q1<-:s2"e oSFL' 0a(fk-1c)"c @'> fk-1r' + "# q1<:s2"e oSFL' fk+1c -1a"c @'> fk+2r'' + "# Q.4"N Q1,Q2 M(M.M&_Word_Search)' !* Do word search, or +! "# Q1:S' !* normal search +! "E + !SFL! -1FS QPUN FG !* If error, go back, ding and exit! + q3"N @ft_FAIL_ 0fs echo active ' !* Saying FAIL if in incremental mode! + 1  '' ]..N !* Otherwise forget where we wanted to go back to! + q.3"N :f !* ^F search, adjust window! + 2fo..Q Next_Screen_Context_Lines :@f ' + Q5"N 0u5 0u7 ' !* If search succeeds, forget BJ mode, redisplay it! + -q3; Q1"L -'1u1 > !* If altmode, Q3=0, exit; else re-enter, count now 1 ! + Q4U..O !* Select main buffer.! + Q6M(M.M&_Maybe_Push_Point) !* Maybe remember where we came from.! + q.3"N :f !* ^F search, adjust window! + 2fo..Q Next_Screen_Context_Lines :@f ' + 0fs Echo Activew 1  !* Leave the search on the screen! + +!^R Reverse String Search:! !^R Search backwards for a character string. +g(m.m~DOC~ ^R String Search)jk! + +-:M(m.m ^R_String_Search ) + +!& Word Search:! !S Subroutine for Word Search (still experimental) +You can search for a sequence of words, separated by any delimiters. +Case is ignored. You specify any substring of the first word, +and prefixes of the rest of the words. Supposed to feel like +the completing reader. + +First numeric arg, search count and direction. +Second numeric arg, string to search for (which is in a buffer). +Returns non-zero if successful.! + + [0 [3 [5 + "L -'1[1 !* Q1 has search direction! + < !* Iterate specified number of times! + < [..o j 1:< fwr >"N 0  ' !* Fail if not given any words (would get NIB error)! + -fwx0 ]..o !* Q0 has first word, pointer is after it! + Q1:S0 F"E  ' !* Find first word, if fails return 0! + "G fkc ' .u5 !* Point and Q5 at start of first word! + :< fwr !* Put point at end of this word! + [..o fwr -fwx3 ]..o !* Q3 gets next word, err out of loop if no more words! + :fwr fq3 f~3"N 0; ' !* If next word doesn't match, return 0 from errset! + >"N 0; ' > !* Exit inner iteration if all words matched! + "L q5j ' > !* If backwards search, leave point on left! + 1  !* Success return! diff --git a/src/emacs1/supprt.418 b/src/emacs1/supprt.418 new file mode 100755 index 00000000..01e74072 Binary files /dev/null and b/src/emacs1/supprt.418 differ diff --git a/src/emacs1/usrcom.514 b/src/emacs1/usrcom.514 new file mode 100755 index 00000000..0eb009a4 --- /dev/null +++ b/src/emacs1/usrcom.514 @@ -0,0 +1,1024 @@ + +!* -*-TECO-*- FOR AUTO MODE SETTING! + +!* Note on major mode commands: + Major modes affect things by setting up local variables and local q-registers. + & Init Buffer Locals discards the locals set up by the previous mode + (actually, all locals except those created at buffer creation times; + see Select Buffer and QInitial Local Count). + & Init Buffer Locals also leaves Q.Q bound to Make Local Q-reg. + Giving a "1," argument to M.L or M.Q tells it to save time by + assuming that the local doesn't already exist. If that isn't so, + it is created twice, so watch out. The 1, argument saves a lot of time. + & Set Mode Line with an argument of 1 sets the variable Mode, + and runs Mode Hook.! + +!LISP Mode:! !C Set things up for editing LISP code. +Puts ^R Indent for LISP on Tab, puts tab-hacking rubout on Rubout. +Paragraphs are delimited only by blank lines.! + + M(M.M &_Init_Buffer_Locals) !* See comment at top of file.! + M.M ^R_Indent_for_Lisp M.Q I + 1,1M.L Space_Indent_Flag + 1,Q¨1,Q. M.Q›W )M.Q .› !* Exchange rubout flavors.! + 1,56 M.L Comment_Column + 1,(:I*;) M.L Comment_Start + 1,(:I*) M.L Paragraph_Delimiter + QPermit_Unmatched_Paren"L + 1,0M.LPermit_Unmatched_Paren' + 1,(:I*COMPLR)M.L Compiler_Filename + M.Q ..D + 0FO..Q Lisp_..D F"N U..D' !* Select the Lisp syntax table! + "# W :G..D U..D !* creating it if doesn't exist.! + Q..D M.V Lisp_..D + -1[1 32< %1*5+1:F..D A> + 9*5+1:F..D_ + !"""""! 1M(M.M &_Alter_..D) || "| // '' `' ,' @' #' [A]A {A}A îî _ _' + 1M(M.M&_Set_Mode_Line) LISP  + +!PALX Mode:! !C Set things up for editing PALX code. +The same as MIDAS mode.! + + :I*PALX,:M(M.M MIDAS_Mode) + +!MIDAS Mode:! !C Set things up for editing MIDAS code. +C-M-N and C-M-P go to next and previous label. +C-M-A and C-M-E go to AC and EA fields, respectively. +C-M-D deletes next word and its terminator (eg, "FOO:"). +Paragraphs are delimited only by blank lines.! + + M(M.M &_Init_Buffer_Locals) !* See comment at top of file.! + [2 FQ2:"G :I2 MIDAS' + 1,1M.L Space_Indent_Flag + 1,32 M.L Comment_Column + 1,(:I*;) M.L Comment_Start + 1,(:I*) M.L Paragraph_Delimiter + F~2 MIDAS"'E +(F~2 PALX"'E)"N !* For MIDAS or PALX, give /E switch to assembler.! + 1,(:I*/E) M.L Compiler_Switches' +!*** Save time by doing the M.M's only once, the first time MIDAS Mode is called.! + 0fo..q MIDAS_Vector[1 + q1"e 5*5fs qvectoru1 q1m.v MIDAS_Vector + m.m ^R_Go_to_AC_Fieldu:1(0) + m.m ^R_Kill_Terminated_Wordu:1(1) + m.m ^R_Go_to_Address_Fieldu:1(2) + m.m ^R_Go_to_Next_Labelu:1(3) + m.m ^R_Go_to_Previous_Labelu:1(4)' + 1,Q:1(0) M.Q ...A + 1,Q:1(1) M.Q ...D + 1,Q:1(2) M.Q ...E + 1,Q:1(3) M.Q ...N + 1,Q:1(4) M.Q ...P + M.Q ..D + 0FO..Q MIDAS_..D F"N U..D' !* Select the Midas-mode syntax table! + "# W :G..D U..D !* creating it if doesn't exist.! + Q..D M.V MIDAS_..D + 1m(m.m &_Alter_..D) <( >)' + 1M(M.M&_Set_Mode_Line) 2  + +!TECO Mode:! !C Set things up for editing TECO code. +g(m.aPURIFY~DOC~ TECO Mode)jk! + + M(M.M Load_Library)PURIFY + :M(M.M TECO_Mode) + +!TEX Mode:! !C Set up for editing TEX input files. +g(m.aTEX~DOC~ TEX Mode)jk! + + M(M.M Load_Library)TEX + :M(M.M TEX_Mode) + +!Scribe Mode:! !C Set up for editing Scribe source text. +g(m.aSCRIBE~DOC~ Scribe Mode)jk! + + m(m.m Load_Library)SCRIBE + :m(m.m Scribe_Mode) + +!Text Mode:! !C Set things up for editing English text. +Tab does ^R Tab to Tab Stop. There are no comments. +Auto Fill does not indent new lines.! + + M(M.M &_Init_Buffer_Locals) !* See comment at top of file.! + M.Q ..D + 1,(:I*RR) M.L Compiler_Filename + 0FO..Q Text_..D F"N U..D' !* Select the Text-mode syntax table! + "# W :G..D U..D !* creating it if doesn't exist.! + Q..D M.V Text_..D + 5*. :F..D __ !* . isn't part of a word (or a "sexp").! + !"! 5*' :F..D AA !* ' is part of a word...! + 5*8 :F..D AA !* BS is part of a word...! + 5*_ :F..D AA !* Underlining is part of a word...! + ' + 1,(M.M ^R_Tab_to_Tab_Stop) M.Q I + 1,0M.L Display_Matching_Paren + 1M(M.M&_Set_Mode_Line) Text  + +!Edit Tabular Text:! !C Temporarily set up for editing a table. +Makes Auto Fill indent the next line, +makes Tab be ^R Tab to Tab Stop.! + + 1[Space_Indent_Flag + M.M ^R_Tab_to_Tab_Stop[I + :I*Tabular_Text [Submode +  0 + +!Edit Indented Text:! !C Temporarily set up for editing indented text. +Good when body of text is indented, but topics appear at the margin. +Tab is ^R Indent Relative; auto fill indents lines. +Paragraphs start only with blank lines. Rubouts hack tabs.! + + M.M ^R_Indent_Relative [I + 127FS^R INIT[.Š 377.@FS^R INIT[Š 1[Space_Indent_Flag + [Fill_Prefix + :I* [Paragraph_Delimiter + :I*  [Page_Delimiter + :I*Indented_Text [Submode +  0 + +!Fundamental Mode:! !C Return to EMACS's initial mode.! + + M(M.M &_Init_Buffer_Locals) !* See comment at top of file.! + 1M(M.M&_Set_Mode_Line) Fundamental  + +!Macsyma Mode:! !C Enter a mode for editing Macsyma code. +Modifies the delimiter dispatch, ..D, appropriate for Macsyma syntax, +puts special rubout on rubout, sets parameters for comment hackery, +and defines Tab to be ^R Indent Nested.! + + M(M.M &_Init_Buffer_Locals) !* See comment at top of file.! + M.M ^R_Indent_Nested M.Q I !* SHOULD BE MACSYMA INDENT, BUT HARD! + 1,1M.L Space_Indent_Flag + 1,Q¨1,Q. M.Q›W )M.Q .› !* Exchange rubout flavors.! + 40 M.L Comment_Column + :I*/*_ M.L Comment_Begin + :I*/* M.L Comment_Start !* MACSYMA USES /* ...*/ FOR COMMENTS! + :I**/ M.L Comment_End + M.Q ..D + 0FO..Q MACSYMA_..D F"N U..D' !* Select the MACSYMA syntax table! + "# W :G..D U..D !* creating it if doesn't exist.! + Q..D M.V MACSYMA_..D + 1M(M.M &_Alter_..D) \/ "| $_ ;_ :_ =_ -_ +_ *_ /_ ^_ <_ >_ @_ !_ #_ &_ |_ ._ ,_ `_ ~_ __ !'! + 5*? :F..DAA' !* ? is alphabetic! + 1000000.[2 Q2-1&(aFS^R INIT)[1 + ]-)*Q2+Q1 M.Q ] + ]1 ]2 + 1M(M.M&_Set_Mode_Line) Macsyma  + +!MUDDLE Mode:! !C Enter a mode for editing MUDDLE code. +g(m.aMUDDLE~DOC~ Muddle Mode)jk! + + M(M.M Load_Library)MUDDLE + :M(M.M Muddle_Mode) + +!PL1 Mode:! !C Set up to edit PL/1 code. +g(m.aPL1~DOC~ PL1 Mode)jk! + + M(M.M Load_Library)PL1 + :M(M.M PL1_Mode) + +!Debug Mode:! !C Invoke TDEBUG for debugging TECO code. +Show two windows with buffer in window 1, and current function code +in window 2. Meta-D gets minibuffer which is stepped through. +Arg is line number to split screen at.! + + !* This version simply autoloads the TDEBUG Library version of this function.! + 1,M.M &_File_TDEBUG_Loaded"E + M(M.M Load_Library) DSK:EMACS;TDEBUG' + F:M(M.M Debug_Mode) + +!Auto Fill Mode:! !C Break lines between words at the right margin. +A positive argument turns Auto Fill mode on; +zero or negative, turns it off. With no argument, the mode is toggled. +When Auto Fill mode is on, lines are broken at spaces +to fit the right margin (position controlled by Fill Column). +You can set the Fill Column with the ^R Set Fill Column.! + + QAuto_Fill_Mode"'E[0 !* No arg => toggle.! + FF"N "'G U0' !* Arg => set from the arg.! + Q0UAuto_Fill_Mode + 0 + +!Atom Word Mode:! !C Make word commands deal with LISP atoms. +A positive argument turns Atom Word mode on; +zero or negative, turns it off. With no argument, the mode is toggled. +When Atom Word mode is on, word commands define a word to mean +a Lisp atom. This affects which characters are delimiters.! + + QAtom_Word_Mode"'E[0 !* No arg => toggle.! + FF"N "'G U0' !* Arg => set from the arg.! + Q0UAtom_Word_Mode + 0 + +!Overwrite Mode:! !C Make printing characters overwrite existing text. +A positive argument turns Overwrite Mode mode on; a zero or negative, +argument turns it off. With no argument, the mode is toggled. +In overwrite mode, printing characters replace a character +instead of pushing the following characters over to the right. +Rubout replaces the preceding character with a space. +To insert use ^R Quoted Insert.! + + QOverwrite_Mode"'E[0 !* No arg => toggle.! + FF"N "'G U0' !* Arg => set from the arg.! + Q0UOverwrite_Mode !* Note that we use value -1, not 1.! + 0 + +!Indent Tabs Mode:! !C Enables or disables use of tabs as indentation. +A positive argument turns use of tabs on; +zero or negative, turns it off. +With no argument, the mode is toggled.! + + QIndent_Tabs_Mode"'E[0 !* No arg => toggle.! + FF"N "'G U0' !* Arg => set from the arg.! + Q0UIndent_Tabs_Mode + Q0"E + @FT Not_using_tabs' + "# @FT Using_tabs' + 0FS ECHO ACT + +!SAIL Character Mode:! !C Enables or disables display of SAIL graphics. +They are single-column graphics for characters 0 through 37. +A positive argument turns display of SAIL graphics on; +zero or negative, turns it off. +With no argument, the mode is toggled.! + + QSAIL_Character_Mode"'E[0 !* No arg => toggle.! + FF"N "'G U0' !* Arg => set from the arg.! + Q0USAIL_Character_Mode + 0FS ECHO ACT + +!Word Abbrev Mode:! !C Turns word abbreviation mode on or off. +g(m.aWORDAB~DOC~ Word Abbrev Mode)jk! + + m(m.mLoad_Library)WORDAB + f:m(m.mWord_Abbrev_Mode) + +!Read Word Abbrev File:! !C Load in file of word abbreviations. +g(m.aWORDAB~DOC~ Read Word Abbrev File)jk! + + m(m.mLoad_Library)WORDAB + f:m(m.mRead_Word_Abbrev_File) + +!Replace String:! !C Replace one string with another, globally. +M-X ReplaceFOOBAR replaces each FOO after point with a BAR. +A numeric argument means replace only FOOs which are +surrounded by delimiter characters. Works by calling Query Replace +and pretending you typed a .! + + 1,f Replace:_[..9 !* Get FOO in q0 and BAR in q1! + !* Keep FOO in Q..9 over F^K to minimize funarg problem.! + 1,f Replace_..9_with:_,q..9(]..9)[0[1 + ! fsreread + .[9 fn q9j + fm(m.m Query_Replace)01 + +!& Case Replace:! !S Like TECO ^F1 FK commands but preserve case.! + +!* Deletes old text by doing FKD. Inserts new text from Q1. +Makes new text unchanged, capitalized or all caps according +to the text replaced. Returns two values good for ^R.! + + fk( .( fkc :fwl + 0,1au4 0,2au2 )j !* Save the 1st alphabetic char of FOO, and following char! + )d g1 !* Replace the FOO with BAR! + q4-100.f"g-27"l !* And if 1st letter of FOO was uppercase,! + q2-100.f"g-27"l !* then if the second was also, turn BAR to all caps.! + fk @fc O Allcaps'' + .( fkc :fwl 1 @fc )j !* Only 1st letter of Foo was cap =>! + !Allcaps! !* uppercasify the 1st letter of BAR.! + '' + -fq1 !* Return bounds of region changed.! + +!Query Replace:! !C Replace string, asking about each occurrence. +M-X Query replaceFOOBAR displays each occurrence of FOO; + you then type a character to say what to do. +Space => replace it with BAR and show next FOO. +Rubout => don't replace, but show next FOO. +Comma => replace this FOO and show result, waiting for next command. +^ => return to site of previous FOO (actually, jump to mark). +^W => kill this FOO and enter recursive editing level. +^R => enter recursive editing level. ^L => redisplay screen. +Exclamation mark => replace all remaining FOOs without asking. + +Period => replace this FOO and exit. Altmode => just exit. +Any other character exits and is read again. +To restart Query Replace after exit, +use ^R Re-execute Mini or run the minibuffer with an argument. + +Numeric arg means only replace FOO when bounded on both sides +by delimiter characters (according to syntax table). + +If Case Replace is nonzero, BAR will be capitalized or all caps +if the FOO found was (but only if FOO is typed all lower case). + +The TECO expression 1,MM Query ReplaceFOOCommands executes Commands +as TECO commands to perform the replacement. The commands should return +a pair of values which delimit the range of the buffer changed. "H" is +safe. To include Altmodes in the commands, quote them with ^]'s. +The commands can use Q2 and Q4 without saving them.! + +!* The value upon exit is -1 if it is done, or non-negative if +"any other" character was typed.! + + 1,f Replace:_[..9 + fq..9"e :i*String_to_replace_is_emptyfs err' + 1,f Replace_..9_with:_[1 !* Get FOO in q0 and BAR in q1! + q..9(]..9)[0 !* Keep FOO in Q..9 over F^K to minimize funarg problem.! + 10f[%center + [..j :i..j Query_Replace.__ 0[..f + [2 [4 [5 + q1[3 "e !* Q3 gets either replace with BAR or execute BAR.! + :i3 1 fk + 0u2 -1u4 !* Q4 gets index of first upper case letter in FOO.! + fq0< %4:g0"u 0;' q4:g0"a %2'> !* Q2 gets >= 0 if FOO has any letters at all.! + Q2"G %4-fq0"e !* If FOO contains letters but they are all lower case,! + 0fo..qCase_Replace"n !* maybe we should try to preserve case.! + m.m &_Case_Replaceu3'''' + "n :i33' !* Make sure user command string ends in altmode.! + F0:"L !* If FOO contains a ^], replace it by two of them.! + f[b bind g0 + j< :s; i> + hx0 f]b bind' +!* Replace String calls us with an excl in FS REREAD.! + fs reread-!"e fiw O Excl' + < :s0"e -1' !* Find next FOO. Return -1 if no more FOOs.! + ff&1"N + 0,FKA"C !' !* Postcomma arg means delimiter must precede! + 0,1A"C !'' !* and follow, or we don't replace it.! + 0@v !* Display it.! + .+fku5 !* Remember where it starts.! + fs rgetty"e 0tt' !* Make sure can see it on printing tty.! + 0f[Helpmac @fi:fcu4 f]helpmac + q4-!"e m3 !* Exclamation mark => replace all remaining FOOs.! + !Excl! !* Come straight here, for Replace String.! + < :s0; + ff&1"N + 0,FKA"C !' !* Postcomma arg means delimiter must precede! + 0,1A"C !'' !* and follow, or we don't replace it.! + m3 > f -1' + q4-,"e m3@V !* Comma => replace with BAR,! + !Pause! 0@V @fi:fcu4 !* Display and read another character.! + q4-.@; !* which we interpret normally, except that we have! + q4-!"e o Excl' + q4fx_,"g 127u4'' !* already replaced this FOO.! + q4-."e m3f 0;' !* Period replaces like Space, then exits.! + q4-f.L"e f+ fkc !' !* ^L clears screen and redisplays, showing same FOO.! + q4-^"e w O Pause' !* ^ => go back to previous occurrence and show.! + q4-(33.fs ^r init)@; !* If char would exit ^R, exit query replace.! + q4-@; !* Altmode also exits.! + q4-f.W"e fkd 0 !' !* ^W kills the FOO and enters ^R.! + q4-f.R"e 0 !' !* ^R enters ^R; on return, move on.! + q4-4110."e ?u4' !* Help is like "?".! +!* Commands below here set the mark.! + q4-?"n q5:' !* except for "?", which is at the bottom for speed.! + + q4-32"e m3f !' !* If char is space, replace with BAR.! + q4-127"e !' !* Rubout => don't replace, move to next FOO.! + q4-?"e !* ? or Help requests help.! + !<<<"! + ft Space_=>_replace,_Rubout_=>_don't,_Comma_=>_replace_and_show, + Period_replaces_once_and_exits,_!_replaces_all_the_rest, + C-R_enters_editor_recursively,_C-W_does_so_after_killing_FOO, + ^_returns_to_previous_locus,_?_gets_help,_C-L_redisplays, + Altmode_exits,_anything_else_exits_and_is_reread. +  + fs rgetty"n ft Type_a_space_to_see_buffer_again. + + :fi-32"e fiw' 0u..h @v' + fkc !' !* Give him another chance to answer for this occurrence.! + q4fs rereadw 0 > !* Random char => exit and re-read it.! + -1fs rereadw 0 + +!Keep Lines:! !Delete Non-Matching Lines:! !C Delete all lines not containing specified string. +Give the TECO search string to search for as a string argument.! + + 1,f Pattern:_ f[ s string !* Initialize search default! + .( .[1 !* Q1 pts at end of last line we are saving! + < :s; 0l !* Find start of next line to save.! + q1,.k !* Kill all before it after previous saved line! + l .u1> !* Mark end of line to preserve it! + q1,zk )j .,z !* Kill all after last saved line! + +!Flush Lines:! !Delete Matching Lines:! !C Delete all lines containing specified string. +Give the TECO search string to search for as a string argument.! + + 1,f Pattern:_ f[ s string !* Initialize search default! + .( < :s; !* Find next line containing string! + 0kk> )j .,z !* and kill it.! + +!Occur:! !List Matching Lines:! !C Displays text lines after point which contain a given string arg. +An arg means type lines before and after each occurrence.! + + 1,f Pattern:_ f[s string !* Save string arg for searching for.! + .[0 FN Q0J !* Restore point.! + [1 FF"E 0U1' + < :S; -Q1T Q1+1T !* Find next occurrence, and type several lines around it.! + Q1"N FT-------- + ' !* If typing > 1 line per occurrence, put in separators.! + L> !* Don't print a line twice.! + FT Done + + 0 + +!How Many:! !Count Occurrences:! !C Counts occurrences of a pattern, after point. +Takes pattern as string arg.! + + 1,f Pattern:_f[s string !* read string arg.! + 0[0 .[2 + fn FT QUIT!__ q0:= ft_occurrences_as_of_location_ .:= FT +  q2j  !* If user quits, say what was found.! + <:s; %0> + q0:= FT_occurrences. +  + q2j ]..n 0 !* Now that answer is out, no need for quit-protection.! + +!Tabify:! !C Convert spaces after point to tabs. +g(m.aAUX~DOC~ Tabify)jk! + + f:m(m.a AUXTabify) + +!Correct Spelling:! !C Correct spelling over the whole buffer. +g(m.aAUX~DOC~ & Correct Buffer Spelling)jk! + + f:m(m.a AUX&_Correct_Buffer_Spelling) + +!Command to Spell:! !C Give command line (string arg) to SPELL job. +g(m.aAUX~DOC~ & Spell JCL)jk! + + f:m(m.a AUX&_Spell_JCL) + +!Untabify:! !C Converts all tabs after point to spaces. +Numeric arg specifies tab stop spacing.! + + f"n f[tab width' + fs tab wid[1 + .[0 fn q0j + 0s  + < :s; -d q1-(fsshpos-(fsshpos/q1*q1)),32i> +  + +!Load Library:! !C Load a library of functions. +Takes filename as string arg; default FN2 is :EJ. +Tries both the specified (or home) directory and EMACS. +An argument means don't run the library's & Setup function. +Pre-comma argument means create variable Library Filename +for Dump Environment's use. +Returns a pointer to the file in core.! + + 1,f Library:_[2 + [0 [.1 f[d file + ff&2"n e[ fne] 0[8' !* if pre-comma argument then push open! + !* input file! + etDSK: fs hsname fs dsname !* Set up defaults.! + 1f[fnam syn et _:EJ !* Read in library file name.! + fs d fn1 :f6[.2 !* Get FN1 as string. Used for & Setup function name.! + f[:ej page !* Must be last pushed. If we like the file, discarded.! + fs :ej pageu0 + 1:< :ej2u.1 + ff&2"n er fsIFileu8 ec' + >"L !* If only one name, it is FN1, and FN2 is :EJ! + F~(0,3:G(FS ERROR))OPN"N FS ERROR FS ERR' + 1:< f[d file !* If not found, try EMACS;.! + :ej EMACS;u.1 + ff&2"n er fsIFileu8 ec' + f]d file >"L !* Not found on EMACS; either => give up.! + F~(0,3:G(FS ERROR))OPN"N FS ERROR FS ERR' + :ej'' !* Make sure err msg mentions spec'd dir, not EMACS.! + q.1fp-100"e !* File is good if it starts with a pure string,! + q.1+fq.1+4-(q0*5120+400000000000.)"e !* whose length is length of file.! + ]*w q.1( !* File good => run its setup function if any,! + ff&3-1"n 1,q.1 m.m~Filename~u.2 fq.2"g + ff&2"n q8m.v.2_Library_Filename' + ff&1"e 1,q.1 m.m &_Setup_.2_Libraryu.1 + fq.1"g m.1'''' + )'' !* then return, not restoring FS :EJPAGE.! + :i*LIB FILE_NOT_IN_LIBRARY_FORMAT fs err + +!Run Library:! !C Run a specific function from a specific library file. +M-X Run Library runs the function +named out of the library , +which is loaded temporarily (unless it is already in core). +If is null, "" is used. +TECO programs should use M.A instead of this function.! + + 1,f Library:_( + 1,f Function:_[.9 !* Get library in q.8 and function in q.9.! + )[.8 + f:m(m.a.8.9) + +!Kill Libraries:! !C Delete some loaded libraries from core. +Offers to kill each library, one by one, most recently loaded first. +Keeps asking until the first time you say no. +Before killing a library, we call its & Kill Library +function (if any) with string-pointer to the library as argument.! + + :ft [0 [4 [5 + < + fs:ejpage*5120+400000000000.u0 !* 1st file in q0! + fq0-1:; + 1,q0m.m~filename~u4 !* Get library's name.! + q4"n f~4 EMACS@;' !* Kill EMACS library? Unthinkable! + q4+1"G ft Kill_Anonymous_Library' + "# ft Kill_4_Library !* Print library name.! + q0m.m~DOC~_~FILENAME~u5 !* Get its global documentation,! + ft _(5)' !* and print it too.! + m(m.m&_Yes_or_No)@; + q4"l 1,q0m.m&_Kill_4_Libraryu5' !* Run the library's kill function if there is one.! + q5"n q0m5' !* Its arg is a pointer to the library in core.! + fs :ejpage+(fq0+4/5120) fs :ejpage' !* Yes => kill this one, ask about next.! + > + 0u..h !* Allow redisplay right away.! + +!List Library:! !C List contents of a library not necessarily loaded. +M-X List Library is the format.! + + F[:EJ PAGE F[D FILE !* POPPING THIS WILL UN-LOAD THE FILE.! + 1,F Library:_[0 [1 + 1,q0m(m.m&_Get_Library_Pointer)[2 + q2"n q2U1' !* Q1 gets ptr to that file, if already loaded.! + "# 1M(M.M Load_Library)0U1' !* If not loaded, load it. Don't run the setup function.! + Q2,Q1M(M.M &_LIST_ONE_FILE)  !* And list the library's contents.! + !* If library is loaded, also list keys that call it.! + +!Compare Windows:! !C Compare text in two windows. +g(m.aAUX~DOC~ & Compare Windows)jk! + + f@:m(m.aAUX&_Compare_Windows) + +!DIRED:! !Edit Directory:! !C Edit a directory. +g(m.aDIRED~DOC~ & DIRED Enter)jk! + + F:M(M.A DIRED&_DIRED_Enter) + +!Reap File:! !C Delete old versions of a file. +g(m.aDIRED~DOC~ Reap File)jk! + + F:M(M.A DIREDReap_File) + +!Clean Directory:! !C Delete old versions in a directory. +g(m.aDIRED~DOC~ Clean Directory)jk! + + F:M(M.A DIREDClean_Directory) + +!Compare Directories:! !C Compare directories on different ITS machines. +fsosteco"n iNot implemented on Twenex.' + "# g(m.aDIRED~DOC~ Compare Directories)jk'! + + :M(M.A DIREDCompare_Directories) + +!Kill Variable:! !C Eliminates definition of specified variable.! + + 1,f Variable:_[0 + :fo..q0 [0 !* Find the variables idx in symbol table (..Q)! + q0"l ' !* Not defined =) do nothing.! + q..q[..o q0*5j 15d 0 !* Else delete the 3 words describing it! + +!Edit Options:! !C Edit values of permanent options. +Displays a table of the variables which are options, +and their values, and lets you edit the values. +A variable is an option if its comment starts with "*" or "*". +When you exit the recursive edit with ^R Exit, the values are updated. +To abort, use Abort.! + + :m(m.a AUX Edit_Options) + +!List Files:! !C Brief directory listing. +g(m.aDIRED~DOC~ List Files)jk! + + :M(M.A DIREDList_Files) + +!List Directories:! !C List names of all disk directories.! + + :M(M.A DIREDList_Directories) + +!RMAIL:! !Read Mail:! !C Read mail using your favorite mail-reader. +Passes a string argument to the mail-reader. +If the variable Mail Reader Library exists, +it is the name of the mail-reader library. +Otherwise, on Twenex, if Mail Reader Program exists, +run that program in a subfork; and an argument means +kill the subfork. The default is RMAIL on ITS, MM on Twenex. + +A precomma arg of 1 means just mail one message. +A precomma arg of 2 tells RMAIL to exit to DDT when done.! + + [2 -1"n :i2 ' !* 2: name of entry point in the library.! + "# :i2 &_Mail_Message' !* Precomma arg of 1 means just mail a message.! + :f "l :i*'"# :i*'[1 !* 1: string argument if any! + 0fo..qMail_Reader_Library[0 !* 0: If string, names mail reader.! + -1"e 0fo..qMail_Sender_Libraryf"nu0'' + q0"e fsosteco"e :i0RMAIL'' !* On ITS, default to RMAIL here.! + fq0:"l fm(m.a 02)1 ' !* Call the library, passing on string arg.! +!* Get here only on Twenex! + 0FO..qMail_Reader_Programu0 + q0"e :i0MM' + 0fo..qMail_Fork[2 !* 2: Old fork if any.! + "e ff&1"n "n q2"n -q2fz !* Argument means kill fork, if it exists.! + 0uMail_Fork' 0''' !* Remember that we no longer have one.! + 0[3 "n f=0MM "e :i3SEND'' !* 3: Maybe string for sending! + m(m.m&_Exit_EMACS) !* clear mode line, home up, autosave.! + 0fo..q Exit_to_Inferior_Hook[1 + q1"n m1' + q3 f"n fs fork jcl' !* Give command line if needed.! + q2"n q2fz 0' !* if old fork, run it! + fsOSTeco-1"e fzSYS:0.EXEu1' !* 20X, use winning SYS:.! + "# fz0.SAVu1' !* 10X, use losing .! + q1 m.v Mail_Fork !* and save fork handle! + 0fo..Q Return_From_Inferior_Hooku1 + q1"n m1' + 0 !* nothing changed in buffer! + +!Send Mail:! !C Mail a message, using your favorite mail-reading program. +If you abort the message, you can resume by giving this +command a nonzero argument. +Refer to the Read Mail command.! + + 1,(f):m(m.mRead_Mail) + +!Edit Syntax Table:! !C Delimiter syntax table editor. +g(m.aAUX~DOC~ Edit Syntax Table)jk! + + :m(m.a AUX Edit_Syntax_Table) + +!View Variable:! !View Q-Register:! !C Type out contents of q-register or variable. +M-X View Var is the format.! + + f[B Bind g(1,f Q-register:_) !* Pick up argument ! + J 1AF(.:"L Z-.-1"N !* If it doesn't look like a q-reg name,! + J27I ZJ27I'' !* put altmodes around it, to treat it as a variable.! + Q..O[1 [2 [3 !* Now that we got the value, it's ok to push qregs.! + J 1A-33."E !* If the q-reg is a named variable,! + D ZJ-D :FO..Q..OU3 !* find its position in the symbol table,! + Q:..Q(Q3)U2 FT Q 2   !* and type the full name (arg maybe was abbrev.! + Q:..Q(Q3+2)U2 !* Get variable's comment, and type if not 0.! + FQ2"G HKG2 !* Have a non-null comment.! + J 1A-!"E !* If comment starts with an excl,! + D S! R.,ZK' !* extract just the stuff between the excls.! + FT__ HT'' + "# :FT Q..O' !* not a named variable => type qreg name as given.! + FT + + [A !* Internal Function ! + 0U3 !* Q3 amount of spacing already hacked this line ! + 0U2 !* Q2 desired indentation ! + @:IA| + Q2-Q3 !* indent ! + Q1FP-1"E FTQ-vector + Q1[..O -1[0 Q2+2[2 + Z/5< Q2 FT( %0:= FT) !* type each element of Q-vector ! + Q0-10"L FT_ ' + Q2+2[3 q2+3[2 Q:1(Q0)[1 + MA ]1 ]2 ]3 > +  ' + Q1FP+1"E FTDead_Buffer +  ' + Q1FP"L Q1=  ' !* Number ! + Q2"N FQ1-2000."G FT Long_String +  '' + FT1 +  !* String ! +| + :MA !* Call it ! + +!View Buffer:! !C View a buffer moving by screenfulls. +Buffer name is string argument; null arg means selected buffer. +Space moves to next screen, Backspace moves back a screen. +Return exits leaving point in current screen. +Anything else exits and restores point to where it was before; +and if it isn't Rubout, it is executed as a command. + +Also useful on fast storage scopes like the Tektronix. +However, Backspace is only available on real displays.! + + 1,F Buffer:_[1 0[2 + fq1"e qBuffer_Nameu1' !* If arg is null, use current buffer.! + "# Q1M(M.M &_Find_Buffer)[2 !* Else get index of specified buffer! + Q:.B(Q2+4!*bufbuf!)[..O' !* and select it, for TECO.! + [..J :I..J Viewing_Buffer_1__ + .[P FN QPJ :I* [..A !* SAVE ., ..A! + q2"e :F FS WINDOW+BJ' + "# q:.b(q2+6!*bufwin!)+bj f[ window' + 1,M(M.MView_File) !* Actually display and process Space and Backspace.! + FS REREAD"L ' !* flushed by rubout or space past end.! + :FI-î"E + FIW !* ^M => leave the cursor in the center of the screen.! + FS RGETTY"E .UP .' + FSWINDOW+BJ + Q2"N .-BU:.B(Q2+6!*bufwin!)' + FSLINESF"EW FS HEIGHT-(FS ECHO LINES+1)-(FS TOP LINE)'/2L .UP .' +  + +!View File:! !C View a file sequentially on the screen. +Type Space to see the next screenful, or Backspace to back up. +Anything else exits. Spacing past last screenful exits. +On non-displays, Backspace is not available. +Does not set the file's reference date. + +Pre-comma argument means view the current buffer contents +and don't change the buffer or Q..J.! + + "E + FN EC !* Close the file when we exit.! + 5,4F View_File[1 1,ER1 + FS D FILE[0 + :I*Viewing_0_ [..J FR !* Set the mode line.! + F[B BIND F[WINDOW' + FS RGETTY"E [H + :< F+ !* Force screen clear on non-displays! + 1:<0,0@FM>W !* Go to beginning of screen line! + FS HEIGHT-1, 34 F:1UH !* Height of the screen! + .,( 1:W .)T !* Do one screens worth! + .-Z@; !* If at the end, quit! + FT--More-- !* Do --MORE-- processing! + :FI-40."N FT_FLUSHED 0;' FI> !* check for FLUSH! + FS REREAD-127."E FIW' !* Discard Rubout if that flushed us.! + F+ ' !* Cause current line to be redisplayed.! + + 0[1 !* Q1 has addr in file of start of buffer.! + .[2 !* Q2 has addr in file of desired top of screen.! + [3 + 1F[^R MORE + FSLINESF"E W FSHEIGHT-(FS TOP LINE)-(FS ECHOLINES+1)'[H !* Usable screen height.! + < "E + Q2+6000-Z-Q1"G !* Have we enough text past that point? If not, read it.! + ZJ Q1+ZFS IF ACCESS + Q2+6000-Z-Q1/5*5FY' + Q2+6000-Z-Q1"G !* Didn't read as much as we wanted =>! + -@FK' !* flush padding from end of file.! + Q1"G Q1-Q2+6000"G !* Not enough before start of screen => read more.! + Q1-Q2+6000/5*5U3 + Q3-Q1"G Q1U3' !* Don't try reading back past start of file.! + J Q1-Q3FS IF ACCES + Q3FY Q1-Q3U1'' + Q1+Z-Q2-10000"G !* Too much past end => flush some.! + ZJ -(Q1+Z-Q2-8000)D' + Q2-Q1-14000"G !* Too much before start of screen => flush some.! + J (Q2-Q1-8000)U3 + Q3D Q3+Q1U1'' + Q2-Q1J .FS WINDOW + .,Z@V + :FIU3 + Q3-127"E FI' !* Discard a rubout.! + Q3-32"N Q3-8"N 0;'' !* Exit on anything but Space or Backspace.! + FI !* Either one, discard as input.! + Q3-32"E 1:< QH,0:FM > !* Space => move down.! + .-Z;' !* Exit if reach EOF. ! + Q3-8"E 1:< -QH,0@FM >' !* BS => move up.! + .+Q1U2 + > + 0U..H !* Redisplay right away.! +  + +!Insert Date:! !C Insert the current time and date after point. +A date in FS IF CDATE format can be given as a numeric +argument, to use instead of the current date. +The mark is put after the inserted text.! + + [1[2 .f[vb fsz-.f[vz + ff"n ' "# fs date' !* Use current date or argument if any. +! fsfdconvertw .-3fam_ !* get date, remove seconds! + 8r \u1 -2d !* find hour of day! + q1-11"g q1-12u1 .+3fp' !* convert to 12 hour, change am to pm! + .,(q1f"ew 12'\)zfx2 -d !* 0 -> 12, save time in qreg! + j eg j5k i_ cfwf(fc)l i,_ 3k !* find day of week! + \-1*10u1 -2dd 1a-0"e dr' !* change numeric month to name! + 2c f_c q1,q1+10g(:i*January___February__March_____April_____May_______June______July______August____September_October___November__December__) + .,(-s_2c).fk i19 !* remove excess spaces! + j g2 z: j h !* combine time and date and return! + +!Visit Tag Table:! !C Select a tag table file. +g(m.aTAGS~DOC~ & Visit Tag Table)jk! + + 1,M.M&_Setup_TAGS_Library"E + M(M.M Load_Library)TAGS' + FF"N M.V Tags_Find_File' + :M(M.M &_Visit_Tag_Table) + +!Dissociated Press:! !C Print interesting random text based on text in buffer. +Arg is number of words of continuity at jumps, +or minus number of characters of continuity.! + + [2 "e 1u2' + [1[3[4 -1F[^MPRINT + :i3 -(*(/))  !* a,bm3 = a mod b! + < fsFlushed"n 0;' + q2"g .u4 1:<,20m3+4 fwr>"l j!' q4,.t + -q2fwx1 + ,zm3j :s1"E js ' r' + "# .,(1:<,20m3+4 c>w).t + q2x1 + ,zm3j :s1"E js '' + > +  + +!Compile:! !C Recompile the file you are visiting. +We first offer to save any changed files, unless there is a numeric arg. +A string argument is used to specify compiler switches. + +If nothing seems to be happening before your compile, just be patient. +If nothing seems to be happening after your compile, first type a Space, +then type POP (on TNX) or P (on ITS). + +Refer to the source code for customization information.! + +!* Customization: (This should be set up for you by your mode.) + +If Compile Command is nonzero, it is executed to do the compilation. +It can find the filename in Q1 and switches in Q4. +It MUST exit with a ^\, to pop what we leave on the stack. + +Otherwise, we run the compiler. Compiler Filename should specify +the compiler's name. On ITS, it is the name of a TS file on your +dir or a system dir. On Twenex, it is a filename, which defaults +to SYS: and to .EXE. If it is 0, the major mode name is used. +If it is positive, the EXECUTE command is used on Twenex; +on ITS, the major mode name is used. + +The string Compiler Switches is used in addition to any switches +you specify in an arg to Compile. +When the compiler returns, we execute After Compilation Hook if it is defined.! + + FF"E M(M.M Save_All_Files)' + + Qbuffer_filenames[1 !* Current file name in 1,! + FSOSTECO"N (fq1-1:G1-0)(fq1-2:G1-.) "E !* except if ".0" exten.,! + 0,fq1-2:G1U1'' !* strip it off! + + Q1F[D FILE + + 0FO..Q Compiler_Switches[4 + FQ4"L :I4' + + 0FO..Q Compile_Command[2 + Q2"N f:M2' + + QModeU2 + 0FO..Q Compiler_Filename[3 + FS OSTECO"E Q3"G 0U3'' !* On ITS: there is no EXEC command. Use mode name.! + Q3"E Q2U3'' !* The mode name is always the default.! + + FS OSTECO"E + :3__14î ' + "# Q3"G F+ 0FZexecute__1_4 î ' + "# :F3"L ! !* Add SYS: if no device or dir.! + :I3 SYS:3'' + .F3"L :I3 3.EXE' !* Add .EXE if no extension.! + :FT -(FZ3 __1_4 î )FZ' + 0U..H -1FSPJATY + ' + 0FO..Q After_Compilation_HookU2 + Q2"N M2 ' +  + +!View Mail:! !C Read your own or other user's mail file. +User name is string argument; null means your own. +Uses View File.! + + 1,f User:_[0 + fs osteco"e + fq0"e fs uname'"# f60' fs u mail !* Set default filename to! + ' !* specified user's mail file, or! + !* this user's if none specified! + "# fq0"e fs hsname' "# q0'fs dsname + etdsk:mail.txt' + m(m.mView_File) 0 + +!Undo:! !C Undo last major change, kill, or undo. +Point is left before the undone change and the mark is left after. +Insertion cannot be undone, nor deletion (as opposed to killing). +If you change the buffer by insertion or deletion before you undo, +you will get slightly wrong results, but probably still useful. +A nonzero arg means don't query, just do it.! + +!* The data for undoing is kept in a qvector in Q..U. + The 0 slot is the TECO buffer in which the change happened. + You can't undo the change in any other buffer. + The 1 slot is the string of old text. + The 2 slot is the old address of the start of that text. + The 3 slot is the old address of the end of that text, + remembered as the distance from the end of the buffer. + The 4 slot is a string identifying the type of change + which is recorded. This is for querying the user. + This database is updated by things like & Kill Text + and & Save Region and Query.! + + q:..u(0)-q..o"n + :i* Not_in_buffer_that_was_changed fs err' + fsz-q:..u(2)-q:..u(3)"l + :i* Things_have_changed_too_much_to_undo_that. fs err' + q:..u(4)[0 + "e + @ft Undo_the_last_0 !* Ask the user whether he really wants to undo.! + 1m(m.m&_Yes_or_No)"e 0'' + q:..u(1)u0 + b-q:..u(2)"g 0fsvb' !* If the virtual bounds get in the way, flush them.! + fsvz-q:..u(3)"g 0fsvz' + q:..u(2)j + .,fsz-q:..u(3)x:..u(1) !* Store the new text for any re-undo.! + .,fsz-q:..u(3)k !* Flush the new text.! + g0 !* Get the old text back.! + .: !* Set the mark after the reinserted text.! + fkc + :i:..u(4)Undo !* Next undo should offer to undo an undo.! + fQ0 + +!Set Variable:! !C Set the value of a named variable. +The name of the variable is a string argument. +If you supply a numeric argument, that is the new value. +Otherwise, a second string is the new value. +You may abbreviate the name of the variable +if you are sure it already exists.! + + 1,F Variable:_( + FF"E 1,F Value:_' "# '[1 + )[0 + :FO..Q 0:"G + 0M.V0' !* Create variable if it doesn't exist.! + Q1U0 0 !* Set value in any case.! + +!Set Key:! !C Put a function on a key. +The function name is a string argument. +The key is always read from the terminal (not a string argument). +It may contain metizers and other prefix characters.! + + m(m.m &_Load_Bare) + 8,F Function_Name:_[0 + m.m0m(m.m&_Macro_Name)u0 + @ft Put_0_on_key:_ + m(m.m &_Read_Q-reg)[1 !* Ask what character to put it in.! + @ft__Go_ahead 1m(m.m&_Yes_or_No)"e 0' + m.m0u1 + 1fsmode ch !* Make WORDAB notice the change.! + +!What Page:! !C Print the current page and line number in the file.! + + 0F[VB .[0 FN Q0J 1[1 + QPage_Delimiter[2 +!* Search, counting page delimiters, but only those at the start of a line.! + J < .,Q0:FB2; FKC 0@F"E %1'W -FKC> + @FT__Page_ Q1@:= + 1U1 + < .,Q0:FB +; %1> + @FT__Line_ Q1@:= + 0FS ECHO ACT + +!What Cursor Position:! !^R Print various things about where cursor is. +Print the X position, the Y position, +the octal code for the following character, +point absolutely and as a percentage of the total file size, +and the virtual boundaries, if any.! + + :i*CFS ECHO DIS + @ft X= fs shpos@:= + @ft_Y= fs ^r vpos@:= + .-z"n @ft_CH= 8[..e 1a@:= ]..e' + @ft_.= .@:= @ft( .*100/fsz@:= @ft%_of_ fsz@:= @ft) + fsvz+b"n + @ft_H=< h@:= @ft>' + @ft_ 0fsecho act + +!View Directory:! !C Print file directory. +Takes directory name as string arg. +Uses and sets the TECO default filenames.! + + 5,F Directory[0 + [..J :I..J Viewing_Directory_0__ + EY0 +  + +!Make Space:! !C Delete things to make space. +Offers to delete the kill ring, buffers, etc. +Even if you answer "no" to all offers, +some internal wasted space is reclaimed.! + + qMM_&_Yes_or_No[.Q !* M.Q to ask a question.! + 0[0 [1 [..O + < q0*5-fq.b; !* process all the EMACS buffers.! + q:.b(q0+4!*bufbuf!)u..o + 20.f? !* Close all large gaps.! + q:.b(q0)+q0u0 > + ]..O + FT Flush_the_kill_ring + m.q"l -1u0 + fq..k/5< 0u:..k(%0) >' + FT Flush_the_Undo_memory + m.q"l -1u0 + fq.u/5< 0u:.u(%0) >' + 0u0 + < q0*5-fq.b; !* process all the EMACS buffers.! + q:.b(q0+1!*bufnam!)u1 + 0:g1-*"e !* If buffer name starts with a star,! + FT Kill_buffer_1 !* offer to kill it.! + m.q"l m(m.m Kill_Buffer)1 !'' + q:.b(q0)+q0u0 > + 2f? !* GC strings.! +  + +!What Available Space:! !C Print amount of free address space left.! + + F[B BIND !* Find top of buffer space! + FS :EJ PAGE-(FS REAL AD+5119/5120)[0 + FS OSTECO"N Q0*2u0' + Q0:@= @FT_pages_available. + 0FS ECHO ACT + 0 + \ No newline at end of file diff --git a/src/emacs1/vars.24 b/src/emacs1/vars.24 new file mode 100755 index 00000000..8d86e486 --- /dev/null +++ b/src/emacs1/vars.24 @@ -0,0 +1,156 @@ +!* Varlist File -*-TECO-*-! + +!&& Variable Name List:! !Q List of strings containing all built-in variables' names.! +!** The start-up process looks down the symbol table and replaces each +variable name with the corresponding one from here if there is one. +This makes all E's share the string names, reducing impure storage,, +and speeds up GC.! + +!** You will see that variable comments are also included herein. +Variable comments must follow the corresponding names. +They become pure strings just like the variable names do. +The start-up process, when it replaces an impure variable name with +a pure one, also sees whether the following pure string matches the +variables's comment, and if so replaces that too. + +However, since no string can span more than one line, +variable comments which include macros to be run are not included.! + + + *F _Hook* + Abort_Resumption_Message + Atom_Word_Mode + Auto_Directory_Display + *_1_=>_display_dir_after_writes,_-1_=>_reads_too + Auto_Fill_Mode + Auto_Push_Point_Notification + *_Searches_setting_mark_type_this + Auto_Push_Point_Option + *_Searches_moving_this_far_set_mark_at_old_point + Auto_Save_All_Buffers + *_non-0_=>_auto_save_all_buffers,_not_just_selected_one + Auto_Save_Count + Auto_Save_Default + Auto_Save_Filenames + *_Filename_for_Auto_Save_files + Auto_Save_Interval + Auto_Save_Max + *_#_of_saves_to_keep + Auto_Save_Mode + Auto_Save_Visited_File + Autoarg_Mode + Backtrace_Temp + Bottom_Display_Margin + Buffer_Filenames + Buffer_Index + Buffer_Name + Case_Replace + *_1_=>_Replace_commands_preserve_case + Case_Search + Comment_Begin + *_String_for_beginning_new_comments + Comment_Column + *_Column_to_start_comments_in + Comment_End + *_String_that_ends_comments + Comment_Rounding + *_Hairy_-_see_code_for_^R_Indent_for_Comment + Comment_Start + *_String_that_indicates_the_start_of_a_comment + CRL_Help + CRL_List + CRL_Name_Lister + CRL_Name_Type + CRL_Prefix + Cursor_Centering_Point + Default_Major_Mode + *_Major_Mode_for_newly_created_buffers + Directory_Lister + Macro_to_use_to_list_directories + Display_Matching_Paren + Display_Mode_Line_Inverse + Display_Overprinting + Echo_Area_Height + Editor_Name + Editor_Type + End_of_Buffer_Display_Margin + Error_Messages_in_Echo_Area + Fill_Column + Fill_Extra_Space_List + *_punctuations_that_need_2_spaces + Fill_Prefix + *_String_to_put_before_each_line_when_filling + Indent_Tabs_Mode + Initial_Local_Count + Lisp_*CATCH_Indent + Lisp_*THROW_Indent + Lisp_CASE_Indent + Lisp_CASEQ_Indent + Lisp_COMPILER-LET_Indent + Lisp_DO_Indent + Lisp_DOLIST_Indent + Lisp_DOTIMES_Indent + Lisp_EVAL-WHEN_Indent + Lisp_Indent_DEFanything + Lisp_Indent_Language + Lisp_Indent_Offset + *_See_^R_Indent_for_Lisp + Lisp_Indentation_Hook + Lisp_IOTA_Indent + Lisp_LAMBDA_Indent + Lisp_LET_Indent + Lisp_LET*_Indent + Lisp_LET-CLOSED_Indent + Lisp_LET-GLOBALLY_Indent + Lisp_MULTIPLE-VALUE-BIND_Indent + Lisp_PROG_Indent + Lisp_PROG1_Indent + Lisp_PROG2_Indent + Lisp_PROGN_Indent + Lisp_SELECT_Indent + Lisp_SELECTQ_Indent + Lisp_UNWIND-PROTECT_Indent + Lisp_WITHOUT-INTERRUPTS_Indent + MM_&_Check_Top_Level + MM_&_Indent + MM_&_Find_Buffer + MM_&_Find_File + MM_&_Get_Library_Pointer + MM_&_Kill_Text + MM_&_Matching_Paren + MM_&_Maybe_Push_Point + MM_&_Maybe_Display_Directory + MM_&_Process_File_Options + MM_&_Read_Line + MM_&_Set_Mode_Line + MM_&_Xindent + MM_Load_Library + Mode + Do_MM_FOO_to_enter_FOO_mode + Next_Bfr_Number + Overwrite_Mode + Page_Delimiter + *_Search_string_for_finding_page_boundaries + Paragraph_Delimiter + *_Lines_starting_with_these_chars_start_paragraphs + Permit_Unmatched_Paren + *_1_=>_allow_unmatched_),_-1_=>_only_in_Lispish_modes + Prefix_Char_List + Previous_Buffer + Read_Line_Delay + Pausing_this_many_1/30_sec_causes_echoing + Region_Query_Size + *_Some_commands_need_confirmation_if_region_this_big + SAIL_Character_Mode + Search_Default_Ring + Search_Exit_Char + Set_Mode_Line_Hook + Space_Indent_Flag + *_If_nonzero,_Auto_Fill_indents_new_lines + Submode + !! 1FS MODE CH + Tab_Stop_Definitions + *_Tab_stops_for_^R_Tab_to_Tab_Stop + Temp_File_FN2_List + *_Reap_File_deletes_these_FN2s + Top_Display_Margin diff --git a/src/emacs1/window.77 b/src/emacs1/window.77 new file mode 100755 index 00000000..2597cfb2 --- /dev/null +++ b/src/emacs1/window.77 @@ -0,0 +1,203 @@ +!* -*-TECO-*-! + +!^R Other Window:! !^R Switch to the other window. +In two-window mode, moves cursor to other window. +In one-window mode, exchanges contents of visible window +with remembered contents of (invisible) window two. +An argument means switch windows but select the same +buffer in the other window.! + + 0FO..QWindow_2_Buffer"E + :I*O1B Only_One_Window FS ERR' + MMM_&_Check_Top_Levelwindows + [Previous_Buffer !* Don't set Previous Buffer to buffer of window we leave.! + Q..O UOther_Window_Buffer + 0FO..QWindow_2_Size"E !* If only 1 window now, but second has existed,! + .( QBuffer_Name( FS WINDOW( !* Then select window 2's buffer in existing window! + QWindow_2_BufferM(M.M Select_Buffer) + QWindow_2_Point:J + QWindow_2_Window FS WINDOW + ) UWindow_2_Window !* And put this window's old buffer into! + ) UWindow_2_Buffer !* (now invisible) window 2! + ) UWindow_2_Point + ' + [1 [2 + FS TOP LINE"E + :I2 1 :I1 2 !* Q1 gets window switching to, Q2 gets window being left.! + QWindow_1_Size+1FS Top Lin + QWindow_2_SizeFS Lines' + "# + :I2 2 :I1 1 + 0FS Top Lin + QWindow_1_SizeFS Lines' + QBuffer_NameUWindow_2_Buffer + .UWindow_2_Pointer + FS WINDOW UWindow_2_Window + FF"E QWindow_1_BufferM(M.M Select_Buffer) + QWindow_1_Pointer:J + QWindow_1_WindowFSWINDOW' +  + +!^R View Two Windows:! !^R Show two windows but stay in first.! + 1, M(M.M ^R_Two_Windows) + +!^R Two Windows:! !^R Show two windows and select window two. +An argument > 1 means give window 2 the same buffer as in Window 1. +A pre-comma argument means keep the cursor in window 1.! + + 0FO..QWindow_2_Size"N + :I*A2W Already_Two_Windows FS ERR' + fs rgetty"e + :I*TTY You_are_on_a_printing_terminalFS ERR' + MMM_&_Check_Top_Levelwindows + [Previous_Buffer !* Don't set Previous Buffer to buffer of window we leave.! + QBuffer_Name M.V Window_1_Buffer + Q..O M.V Other_Window_Buffer + FS WINDOW M.V Window_1_Window + . M.V Window_1_Pointer + FSLINES M.VDefault_Size + FS LINESF"E + FS HEIGHT-(FS ECHO LINES)-1 ' M.V Total_Size + 0FO..Q Window_2_Buffer"E !* If never have had window 2 as yet,! + QTotal_Size/2 M.V Window_1_Size !* Make window 2 hold same buffer as window 1,! + 0FO..Q Tags_Find_File"N o Same' + -1"N o Same' + "N :I*W2 m(m.m &_Create_Buffer)' !* or make it hold W2.! + :I*W2 M.V Window_2_Buffer o W2' + -1"N + !Same! + QBuffer_Name M.V Window_2_Buffer + !W2! + . M.V Window_2_Pointer !* Arg => Window 2 gets same buffer as window 1.! + FS Window M.V Window_2_Window' + QWindow_1_Size[0 + QTotal_Size-1-Q0:"G !* If old window 1 size is unreasonable, fix it up.! + QTotal_Size/2U0 Q0UWindow_1_Size' + 1F[NOQUIT + QTotal_Size-1-Q0 M.V Window_2_Size + FS REFRESHM.V Window_1_Refresh + M.M &_Multi-window_Refresh FS REFRESH + "N Q0 FS LINESW + Q:.B(QWindow_2_Buffer M(M.M &_Find_Buffer)+4!*bufbuf!) M.V Other_Window_Buffer + F]NOQUIT + M(FS REFRESH)W ' !* If cursor should stay in top window, display bottom one.! + Q0 FS TOP LINE !* Else, draw the line of dots, and switch into bottom! + :FT FS WIDTH/10 0U..H !* window, causing it to be displayed.! + -1FS TYPEOUT + 0FS TOP LINE + F]NOQUIT + :M(M.M ^R_Other_Window) + +!^R One Window:! !^R Display only one window. +Normally, we display what used to be in the top window, +but a numeric argument says to display what was in the bottom one.! + + 0FO..QWindow_2_Size"E + :I*O1B Only_One_Window FS ERR' + MMM_&_Check_Top_Levelwindows + [Previous_Buffer !* Don't set Previous Buffer to buffer of window we leave.! + FS TOP LIN"N !* If we're in window 2 now,! + M(M.M^R_Other_Window)' !* switch to window 1.! + 0UWindow_2_Size !* Put us officially in one window mode.! + 0FS Top Line + QDefault_Size FS LINES + QWindow_1_Refresh FS REFRESH + FF"N + :M(M.M ^R_Other_Window)' !* With arg, stay in what used to be window 2.! +  + +!& Multi-window Refresh:! !S Redisplay the screen when there are two windows.! + + QWindow_1_RefreshF"N[1 M(Q1(]1))' !* Execute the global FS REFRESH if any.! + FS QP PTR + 0F[REFRESH + .[1 FN q1j [1 [2 + FS TOP LINE"N !* Temporarily TECO-select the other window! + QWindow_1_SizeF[LINES 0F[TOP LINE + :I2 1' + "# QWindow_2_SizeF[LINES QWindow_1_Size+1F[TOP LINE + :I2 2' + QWindow_2_WindowF[WINDOW !* but don't take the time for an EMACS buffer switch.! + QWindow_2_Point:J + QOther_Window_Buffer[..O + -1F[D FORCE !* Don't abort this display due to typeahead.! + 0U..H @V !* Now redisplay that window.! + 0FS LINES !* Now redisplay the line of stars across the middle.! + QWindow_1_SizeFS TOP LIN + :FT FS WIDTH/10 + -FSTYPEOUTW 0U..H + QPFS QP UNWIND W + +!* Note that we fall off the end, with all qregs popped by the FS QP UNWIND.! +!* This is so that other things can be consed onto the end of FS REFRESH.! + +!^R Grow Window:! !^R Make this window (or minibuffer) use more lines. +Argument is number of extra lines (can be negative).! + Q..F-Q.F"N FS LINES"E FG 0' !* If not at top level, try to extend minibuffer.! + !* Complain if uses whole screen.! + FS LINES+FS LINES + M(FS REFRESH) W' + 0FO..QWindow_2_Size"E !* Else if only one window, can't grow it.! + :I*O1B Only_One_Window FS ERR' + [1 FS TOP LIN[0 + Q0"E -Q1U1' !* Q1 gets # lines window 2 is growing by.! + QWindow_1_Size-Q1-1"L O LOSE' + QWindow_2_Size+Q1 F"G UWindow_2_Size' + "# !LOSE! + :I*Windows_need_at_least_one_line FSERR' + QWindow_1_Size-Q1 UWindow_1_Size !* Adjust both sizes! + Q0"E + QOther_Window_Buffer[..O !* if in window 1, temporarily teco-select window 2! + QWindow_2_Window F[Window !* but don't do the EMACS buffer switch.! + .[P FN QPJ + QWindow_2_Point:J' + .( 1:< FS WINDOW+BJ !* Adjust w2's FS WINDOW for lines! + -Q1F"G :' "# @' ,0FM !* it is gaining or losing at the top.! + .-BFS WINDOW>W )J + Q0"E FS WINDOW UWindow_2_Window + -4 FS QP UNWIND' !* pop back to actual current window.! + Q0"E FS LINES+ FS LINES' + "# FS TOP LINE- FS TOP LINE !* Also adjust TECO window settings.! + FS LINES+ FS LINES' + :M(FS REFRESH) + +!^R Scroll Other Window:! !^R Scroll other window up several lines. +Specify the number as a numeric argument, negative for down. +The default is a whole screenful up. Just Meta-Minus as argument +means scroll a whole screenful down.! + + 0FO..QWindow_2_Size"E + :I*O1B Only_One_Window FS ERR' + .[1 FN q1j [1 [2 + QOther_Window_Buffer[..O + FS TOP LINE"N !* Now TECO-select the other window,! + QWindow_1_SizeF[LINES 0F[TOP LINE + :I2 1' + "# QWindow_2_SizeF[LINES QWindow_1_Size+1F[TOP LINE + :I2 2' + QWindow_2_WindowF[WINDOW !* but don't take the time for an EMACS buffer switch.! + QWindow_2_Point:J + -1F[DFORCE !* Don't stop this display for type-ahead.! + FS ^R ARGP-5"E !* Handle just Meta-minus as argument.! + @M(M.M ^R_Previous_Screen)' + "# F@M(M.M ^R_Next_Screen)' + 0@V + .UWindow_2_Point + FS WINDOW UWindow_2_Window +  + +!^R Visit in Other Window:! !^R Find buffer, tag or file in other window. +Follow this command by B or C-B and a buffer name, +F or C-F and a file name, or T or . and a tag name. +We find the buffer, tag or file in the other window, +creating the other window if necessary.! + + 0fo..Q Window_2_Size"e !* If not in 2 window mode, enter it.! + 2m(m.m ^R_Two_Windows)' + "# 2m(m.m ^R_Other_Window)' !* Else go to other window.! + 1fstypeoutw m.i fi:fc[1 !* Make ^X4 echo if we pause, but prevent redisplay.! + -1fstypeout !* Make ? now not print on same line as dashes.! + q1f*B"g :m(m.m Select_Buffer)' + q1f*F"g :m(m.m Find_File)' + q1f*T."g :m(m.m ^R_Find_Tag)' + :fg 0 diff --git a/src/emacs1/wrdlst.196 b/src/emacs1/wrdlst.196 new file mode 100755 index 00000000..d81fa545 Binary files /dev/null and b/src/emacs1/wrdlst.196 differ