mirror of
https://github.com/PDP-10/its.git
synced 2026-03-09 20:38:23 +00:00
Add Lisp-related EMACS libraries:
DOCLSP, ELISP, LEDIT, LISPT, LSPUTL, and XLISP.
This commit is contained in:
committed by
Eric Swenson
parent
edbea89c72
commit
2624185d09
@@ -263,6 +263,11 @@ respond "\n" "\033xgenerate\033emacs;abstr\033emacs1;abstr\r"
|
||||
respond ":EJ" "\025\033x& compress file\033emacs1;auto-s\r"
|
||||
respond "Compressing file" "\033xgenerate\033emacs;auto-s\033emacs1;auto-s\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;dired\033emacs1;dired\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;doclsp\033emacs1;doclsp\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;elisp\033emacs1;elisp\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;ledit\033emacs1;ledit\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;lispt\033emacs1;lispt\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;lsputl\033emacs1;lsputl\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;tags\033emacs1;tags\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;taggen\033emacs1;taggen\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;slowly\033emacs1;slowly\r"
|
||||
@@ -274,6 +279,7 @@ respond ":EJ" "\033xgenerate\033emacs;delim\033emacs1;delim\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;modlin\033emacs1;modlin\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;vt100\033emacs1;vt100\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;vt52\033emacs1;vt52\r"
|
||||
respond ":EJ" "\033xgenerate\033emacs;xlisp\033emacs1;xlisp\r"
|
||||
|
||||
respond ":EJ" "\033xrun\033einit\033? Document\r"
|
||||
respond "\n" "\030\003"
|
||||
|
||||
103
src/emacs1/doclsp.30
Executable file
103
src/emacs1/doclsp.30
Executable file
@@ -0,0 +1,103 @@
|
||||
!* -*- TECO -*- !
|
||||
!~FILENAME~:! !LISPDOC command similar to TECDOC!
|
||||
DOCLISP
|
||||
|
||||
!DOCLISP:! !C Print out LISP documentation
|
||||
Takes string arg of command to find. If string is null, it will
|
||||
prompt for one.!
|
||||
|
||||
f[ B Bind !* Get our own buffer!
|
||||
f[ D File !* Don't modify defaults!
|
||||
FN EC FS RGETTY "EFT
|
||||
' !* Be sure to close on exit, and look nice!
|
||||
!* on losing terminals!
|
||||
er DSK:macind;MACLSP_MANDOC 1:A !* Get the pointer to the directory!
|
||||
\ FS IF Access !* Access the directory!
|
||||
^Y !* read it in!
|
||||
ER !* re-open it!
|
||||
s'(l 0,.k !* Flush superfluous header!
|
||||
1,FLISP_Command?__ [1 !* Get the argument!
|
||||
FQ1 "E !* if null!
|
||||
:F"G !* and we were called via MM or whatever!
|
||||
1, m(m.m &_Read_Line)LISP_Command?__ f(u1)"E''' !* try from TTY!
|
||||
FQ1 "E !* Still null? !
|
||||
0FO..Q DOCLISP_Last_Argument u1' !* try our previous arg!
|
||||
q1"E @FT_[No_Previous_LISP_command]
|
||||
!* nope, just give up on him!
|
||||
0fs echo active w' !* don't flush typeout!
|
||||
q1 m.v DOCLISP_Last_Argument !* remember for next time!
|
||||
QLISPDOC_Readtable[..D !* Get our very own readtable!
|
||||
FS B Cons[ 0 !* Get a buffer to read things into!
|
||||
[2[3
|
||||
J F<!NUFF! !* For each thing he gives!
|
||||
<3+.-z; !* For each entry in table!
|
||||
.+1,(fWl .):FB 1 "N !* If it is a match!
|
||||
s !* make sure at end of word!
|
||||
s r \U2 !* Get the location!
|
||||
s r \U3 !* Get the size!
|
||||
Q0 [..O !* Use our temporary buffer!
|
||||
Q2 FS IF ACCESS !* Find the item!
|
||||
hk !* flush the old contents!
|
||||
Q3 FY !* Read in the item!
|
||||
:FT !* go to top of screen!
|
||||
FS RGETTY "N HT'"# !* If it is not printing, just display it!
|
||||
0j t l FT--MORE-- !* Give him a taste!
|
||||
:fi f(u3)-40. "E !* If he want more!
|
||||
.,zt fiw'"# !* Give it to him!
|
||||
q3-177. "E !* Else if he wants to flush!
|
||||
fiw' !* Gobble!
|
||||
FTFlushed.
|
||||
''
|
||||
FT
|
||||
|
||||
!* Terpri a bit!
|
||||
]..O !* Restore the directory buffer!
|
||||
l !* move on to next entry for re-try!
|
||||
0;' !* Stop and ask for more!
|
||||
l> !* Nope, try next entry!
|
||||
Q2 "E FTNot_Found?
|
||||
' !* if no entry was found, point that out!
|
||||
FTMore?__ !* ask the question!
|
||||
FI u2 !* get the answer!
|
||||
<q2-27"E j 1,m(m.m&_Read_Line)LISP_Command?__u1 0u2 0;' !* ALT -- read new!
|
||||
Q2-
|
||||
"E 0u2 0;' !* If LF just use same one again, flush Q2!
|
||||
!* so that failure will be detected!
|
||||
q2-_ "E 0u2 :i1 0;' !* string will find next entry!
|
||||
q2-177."E F;NUFF' !* rubout exits!
|
||||
q2-15. "E -1fsreread F;NUFF' !* CR flushes LF and exits!
|
||||
q2-140."G Q2-40.u2 ' !* uppercasify!
|
||||
Q2-N "E F;NUFF' !* N exits!
|
||||
Q2-Q "E F;NUFF' !* Q exits!
|
||||
Q2-X "E F;NUFF' !* X Exits!
|
||||
Q2-14. "E :ft0 !* ^L retypes!
|
||||
'"#FT !* Anything else documents!
|
||||
Responses_at_this_point_are:
|
||||
<space> Print_next_entry
|
||||
<LF> Search_for_same_item_again
|
||||
<altmode> Read_a_new_item_to_search_for
|
||||
<Control-L> Redisplays
|
||||
N,Q,X,<rubout> exit.
|
||||
'
|
||||
ft
|
||||
More?__
|
||||
FIU2> !* Get his new command!
|
||||
> !* Done? OK, see you later!
|
||||
0u..h !* don't inhibit re-display!
|
||||
|
||||
|
||||
!& Setup DOCLISP Library:! !S Initialze, create ..D, etc.!
|
||||
|
||||
:i*..D[0 !* 0 gets a copy of ..D
|
||||
!*5:f0AA !* Modify our copy!
|
||||
-*5:F0AA
|
||||
+*5:F0AA
|
||||
=*5:F0AA
|
||||
>*5:F0AA
|
||||
<*5:F0AA
|
||||
**5:F0AA
|
||||
\*5:F0AA
|
||||
/*5:F0A/ !* / does not terminate words etc.!
|
||||
|*5:F0A| !* | doesn't either!
|
||||
95 *5:F0AA !* Can't say ^^_ or ^^^Q_ or ^^^]^Q_!
|
||||
Q0 m.vLISPDOC_Readtable !* and save it for future scan!
|
||||
BIN
src/emacs1/elisp.10
Executable file
BIN
src/emacs1/elisp.10
Executable file
Binary file not shown.
BIN
src/emacs1/ledit.34
Executable file
BIN
src/emacs1/ledit.34
Executable file
Binary file not shown.
BIN
src/emacs1/lispt.264
Executable file
BIN
src/emacs1/lispt.264
Executable file
Binary file not shown.
BIN
src/emacs1/lsputl.8
Executable file
BIN
src/emacs1/lsputl.8
Executable file
Binary file not shown.
361
src/emacs1/xlisp.110
Executable file
361
src/emacs1/xlisp.110
Executable file
@@ -0,0 +1,361 @@
|
||||
!* -*- Teco -*- Library created and maintained by KMP@MC !
|
||||
|
||||
!* Bugs, feature requests, etc... !
|
||||
!* !
|
||||
!* [Source: KMP (07/16/80)] !
|
||||
!* This needs to be sure it has a good ..D or else floating point !
|
||||
!* numbers and other screws will happen -- eg, PRINC+T function in !
|
||||
!* RAB;OUTMIS will get mistaken for a PRINC if not careful. -kmp !
|
||||
!* !
|
||||
!* [Source: CWH] !
|
||||
!* (cond (condition then-clause) (t else-clause)) !
|
||||
!* <=> (IF condition then-clause else-clause) !
|
||||
!* !
|
||||
!* [Source: KMP] !
|
||||
!* (and exp1 exp2) <=> (IF exp1 exp2) !
|
||||
!* (or exp1 exp2) <=> (IF (NOT exp1) exp2) ; Maybe IFN, too? !
|
||||
!* Old-DO <=> New-DO !
|
||||
!* (PROG (...) ...) => (LET (..) ...) ; if no RETURN or GOs !
|
||||
!* ; Maybe find leading SETQs and move into the BVL. Super-tricky !
|
||||
!* ; due to the evaluation environment differences. !
|
||||
!* (TERPRI), (TYO ...), (PRIN1 ...), (PRINC ...), ... ; Sequences only !
|
||||
!* <=> (FORMAT ...) !
|
||||
!* !
|
||||
!* [Source: RWK (07/16/80) !
|
||||
!* Do these allow one to do M-X Undo? !
|
||||
!* !
|
||||
!* [Source: CWH (07/16/80)] !
|
||||
!* You may also want to include WHEN and UNLESS. I have been using !
|
||||
!* these recently after RWK convinced me they were winners. You may !
|
||||
!* also want to write one completely hairy macro which figures out !
|
||||
!* which of the above transformations you want applied. As long as it !
|
||||
!* can be undone with M-X Undo, such a frob wouldn't be too dangerous. !
|
||||
!* !
|
||||
!* [Source: CWH (07/21/80)] Re: LAMBDA->LET !
|
||||
!* I would prefer it if ((LAMBDA (X) Z) NIL) became !
|
||||
!* (LET ((X NIL)) Z) instead of (LET (X) Z). Perhaps a switch? !
|
||||
!* Also, modernizing ((LAMBDA (X Y) Z) 0 0) inserts a spurious !
|
||||
!* space after the first 0. !
|
||||
|
||||
!~Filename~:! !Macros for transforming Lisp Code!
|
||||
XLISP
|
||||
|
||||
!& Query Loop:! !& Loop doing things and asking for confirmation!
|
||||
|
||||
:i*Query/[..J[C[0[P
|
||||
|
||||
<m();w !* Execute Entry Condition !
|
||||
:i* C Change?_ fsechodispw @v !* Prompt for input !
|
||||
@:fi uC !* Peek for command !
|
||||
qC-4110."e ?uC '"# :fiuC ' !* Get ascii in qC !
|
||||
@ft C_... !* Tell the user we saw input !
|
||||
qC-^"e fi !* If cmd = ^ !
|
||||
.:ww1:<> oPause' !* Go to previous !
|
||||
qC f _ , . :"l fi !* If cmd = Space or Comma, !
|
||||
.u0 m() q0j !* Run change macro !
|
||||
qC-,"e !* If comma, show result !
|
||||
!Pause! !* Come here to pause !
|
||||
:i* C Ok?_ fsechodisp w @v !* Wait while (s)he approves !
|
||||
:fi uC !* Peek for command !
|
||||
qC-4110."e ?uC '"# :fiuC ' !* Get ascii in qC !
|
||||
@ft C_... !* Tell the user we saw input !
|
||||
qC-_ "e fi !* If space, !
|
||||
oLoop' !* then go on !
|
||||
qC f QqXx :"l fi !* If Q or X, !
|
||||
' !* then Exit !
|
||||
qC-^"e fi !* If ^, !
|
||||
.:ww1:<> oPause' !* Go to previous !
|
||||
qC-"e fi !* If Control-R, !
|
||||
oPause' !* then edit and re-pause !
|
||||
qC-"e fi !* If Control-L, !
|
||||
@m(m.m^R_New_Window) !* Redisplay !
|
||||
oPause ' !* and then pause !
|
||||
qC-?"e fi !* If ? or Help, !
|
||||
ft Space__=_Continue____C-L_=_Redisplay____C-R____=_Edit
|
||||
Q_or_X_=_Exit________Anything_else_aborts_and_is
|
||||
______________________reread_as_a_command.
|
||||
--Pause-- oPause' !* Show help info !
|
||||
' !* No Such Option. Exit. !
|
||||
qC-."e ' !* Return if dot !
|
||||
oLoop' !* Continue looking if not comma !
|
||||
qC-"e fi !* If cmd = Control-R, !
|
||||
oLoop ' !* Edit and Loop !
|
||||
qC-¢e fi !* If cmd = Rubout !
|
||||
:-."n .' fkr oSkipLoop ' !* Skip this entry and find next !
|
||||
qC-"e fi !* If cmd = Control-L, !
|
||||
@m(m.m^R_New_Window)w oLoop' !* Redisplay and loop !
|
||||
qC f ? :"l fi !* If cmd = ? or Help !
|
||||
!"! ft Space__=_Replace_entry_and_move_on__________C-L_=_Redisplay
|
||||
Comma__=_Replace_entry_and_await_approval___C-R_=_Edit
|
||||
Rubout_=_Don't_replace_this_entry
|
||||
Period_=_Replace_and_exit___________________Anything_else_exits
|
||||
Q_or_X_=_Exit________________________________and_is_reread_as_a_command.
|
||||
--Pause-- oLoop ' !* Show help info !
|
||||
qC f XxQq "l fi !* If cmd = Q or X, !
|
||||
' !* Just exit, eating char !
|
||||
' !* Exit if unknown command !
|
||||
!Loop! :-."n.' !SkipLoop!> !* Continue looping !
|
||||
:i*CEnd_of_..Jfsechodisplay
|
||||
0fsechoactive
|
||||
|
||||
|
||||
|
||||
!Modernize FUNCTION References:! !S Change (FUNCTION form) => #'form !
|
||||
|
||||
@:i*| :s(FUNCTION( fkc )|,( !* Search for (FUNCTION !
|
||||
@:i*| .[0 fll 1f[noquitw -d !* Go kill ending paren !
|
||||
q0j 9d @f_
|
||||
î k !* Kill (FUNCTION & whitespace !
|
||||
.u0 !"! i#' 2r !* Insert #' !
|
||||
m(m.m &_XLISP_Indent_SEXP) !* Re-Indent S-Expression !
|
||||
!* Go to top of S-Expression !
|
||||
|) !"<! m(m.m &_Query_Loop)Modernize:_(FUNCTION_exp)_=>_#'exp
|
||||
!* Loop asking about this stuff !
|
||||
|
||||
|
||||
|
||||
!Modernize Old CATCH/THROW References:! !S CATCH/THROW => *CATCH/*THROW !
|
||||
|
||||
@:i*| :s(CATCH(THROW( !* Search for (CATCH or (THROW !
|
||||
fkc )|,( !* and hop back over it !
|
||||
@:i*| .[0[1 1f[noquitw c @fll !* Insert missing star !
|
||||
<:@fll 1a-;:@; l> @fll !* Pas first arg !
|
||||
:@fll 1a-;"e !"! :i*CH; Can't_hack_comment fserr '
|
||||
@m(m.m ^R_Transpose_Sexps) !* Interchange !
|
||||
-2@fll !"! i' q0+1j i* !* Back up and quote arg1 !
|
||||
!* Go to top of S-Expression !
|
||||
|) !"<! m(m.m &_Query_Loop)Modernize:_(CATCH/THROW_form_tag)_=>_(*CATCH/*THROW_'tag_form)
|
||||
!* Loop asking about this stuff !
|
||||
|
||||
|
||||
|
||||
!Modernize QUOTE References:! !S Change (QUOTE form) => 'form !
|
||||
|
||||
@:i*| :s(QUOTE( fkc )|,( !* Search for (QUOTE !
|
||||
@:i*| .[0 fll 1f[noquitw -d !* Go kill ending paren !
|
||||
q0j 6d @f_
|
||||
î k !* Kill (QUOTE & whitespace !
|
||||
.u0 !"! i' 2r !* Insert #' !
|
||||
m(m.m &_XLISP_Indent_SEXP) !* Re-Indent S-Expression !
|
||||
!* Go to top of S-Expression !
|
||||
|) !"<! m(m.m &_Query_Loop)Modernize:_(QUOTE_exp)_=>_'exp
|
||||
!* Loop asking about this stuff !
|
||||
|
||||
|
||||
|
||||
!Modernize LAMBDA References:! !S Change '(LAMBDA ...) => #'(LAMBDA ...) !
|
||||
|
||||
@:i*| !"! :s#'(LAMBDA( fkcc )|,( !* Search for '(LAMBDA !
|
||||
@:i*| i# r m(m.m&_XLISP_Indent_SEXP)
|
||||
|) !"<"! m(m.m &_Query_Loop)Modernize:_'(LAMBDA_...)_=>_#'(LAMBDA_...)
|
||||
!* Loop asking about this stuff !
|
||||
|
||||
|
||||
!Modernize MAP References:! !S Change (MAPxxx '... ...) => (MAPxxx #'... ...)!
|
||||
|
||||
@:i*| [0<:s(MAP"e 0' !* Look for MAP, fail if none !
|
||||
.-4u0 !* Remember place we started from !
|
||||
1a:"b @fll ' !* Go to end of printname if not MAP!
|
||||
@f_
|
||||
îl !* Move to beginning of next object !
|
||||
!"! 1a-'"e q0j -1 '>
|
||||
|,( !* If just singlequote, win !
|
||||
|
||||
@:i*| c @fll !"! s' r i# r m(m.m&_XLISP_Indent_SEXP)
|
||||
|) !"<"! m(m.m &_Query_Loop)Modernize:_(MAPx_'fun_...)_=>_(MAPx_#'fun_...)
|
||||
|
||||
|
||||
!Modernize Strings:! !S Search for things in |...| => "..."!
|
||||
|
||||
@:i*~ :s/|"e 0' r -1 ~,( !* Look for | !
|
||||
@:i*~ 1f[noquit !* Defer interrupts !
|
||||
f[vbwf[vz !* Bind buffer bounds !
|
||||
!"! 0,0a-'"e -d ' !* Maybe delete singlequote !
|
||||
.,( s/| -d . )fsbound !* Narrow bounds !
|
||||
j d <.-z; 1a-/"e c' !* Loop, skip slashed things !
|
||||
"# 1af"|!'!:"l i/ '' !* Slashify " or | !
|
||||
c > !* Move forward !
|
||||
j i"!'! zj i"!'! j !* Insert Doublequotes !
|
||||
!* Return !
|
||||
~) !<! m(m.m &_Query_Loop)Modernize:_|...|_=>_"..." !''!
|
||||
|
||||
!Lowercase Lisp Buffer:! !S Lowercase a buffer of lisp text
|
||||
respecting things that should not get lowercased.!
|
||||
|
||||
[S !* State Register !
|
||||
j 0uS !* Initial state 0 !
|
||||
< .-z; !* Stop at end of virtual buffer !
|
||||
qS"e 1af"|!'!:"l 1auS ' ' !* Complement state on | or " !
|
||||
"# 1a-qS"e 0uS ' ' !* Unless in a | or " already... !
|
||||
qS"e 1 | ||||