CHAPTER20INTERLISP-DDISPLAY-ORIENTEDTOOLSOneofthegreateststrengthsofInterlisp-Disthewindowdisplaysystem.Usingthissystem,anumberoftheexistingInterlisptoolshavebeenextended,andsomenewonesdeveloped.Thischapterdescribessomeofthesetools.20.1DEDITDEditisastructureoriented,modeless,displaybasededitorforobjectsrepresentedasliststructures,suchasfunctions,propertylists,datavalues,etc.DEditisanintegralpartofthestandardInterlisp-Denvironment.20.1.1GeneralCommentsDEditisdesignedtobetheuser'sprimaryeditorforprogramsanddata.Tothatend,ithasincorporatedtheinterfacesofthe(older)teletypeorientedInterlispeditorsothetwocanbeusedinterchangeably.Inaddition,thefullpoweroftheteletypeeditor,andindeedthefullInterlispsystemitself,iseasilyaccessiblefromwithinDEdit.DEditisstructure,ratherthancharacter,orientedtofacilitateselectingandoperatingonpiecesofstructureasobjectsintheirownright,ratherthanascollectionsofcharacters.However,fortheoccasionalsituationwhencharacterorientededitingisappropriate,DEditprovidesaccesstotheInterlisp-Dtexteditingfacilities.DEditismodeless,inthatallcommandsoperateonpreviouslyselectedarguments,ratherthancausingthebehavioroftheinterfacetochangeduringargumentspecication.20.1.2OperationDEditisnormallycalledthroughofthefollowingfunctions:[NLambdaNoSpreadFunction]CallsDEditonthedenitionofthefunction.[NLambdaNoSpreadFunction]CallsDEditonthevalueofthevariable.[NLambdaNoSpreadFunction]CallsDEditonthepropertyoftheatom.Ifisnotgiven,thewholepropertylistofisedited.20.1(DF)(DV)(DP)FNFNVARVARNAMEPROPPROPNAMEPROPNAME|\%L,V #$+=3ExO  )= #E$&l(. 27;>CDM   t"[(+H.14 <?CLS  |3|E0 ix@ 4#Z(1,70^27 ?@CJ ?%  3 iN!i& ) -C.058:=#B H;= |9 ix4 d#'* 0 26;8W;>?kA 3  m !&,-0P2747:4 6$+ "O')- .46<>BD%+  g_"r$ *,U 3:9[;= DG)t  v  (,x2?68p; @sBREE' eQ "(-/ 6; BF&) . ";&+L1p |! ix_  vA5h "}( Z6*=C5!9#)+~-46*=C 5!9#'=(+R26*=C^*^!x#-/P189?V@C]G !E#)M*(o!}`m$`xZ   } `m$xZ H3P H  012 H`^)+;5Q;g= %8!}$`m$6InteractiveOperation[NLambdaNoSpreadFunction]CallsDEditonthelecommandsforthele.DEditisnormallyinstalledasthedefaulteditorforalleditingoperations,includingthoseinvokedbyothersubsystems,suchastheProgrammer'sAssistantandMasterscope.DEditprovidesfunctions,and(analogoustothecorrespondingfunctions)forconvenientlyaccessingtheteletypeeditorfromwithinaDEditcontext,e.g.fromunderacalltoDEditorifDEditisinstalledasthedefaulteditor.Thedefaulteditormaybesetwith:[Function]Ifisnon-,setsthedefaulteditortobeDEdit(ifis),ortheteletypeeditor(ifis).Returnstheprevioussetting.DEditoperatesbyprovidinganalternative,plugcompatibledenitionof().ThenormaluserentriesoperatebyredeningandthencallingthecorrespondingEditfunction(i.e.,callsetc).Thus,thenormalEditlepackage,spellingcorrection,etc.behaviorisobtained.IfEditcommandsarespeciedinacallto(e.g.,incallstotheeditorfromMasterscope),willpassthosecommandsto,afterhavingplacedaentryonwhichwillcauseDEdittobeinvokedifanyinteractionwiththeuseriscalledfor.Inthisway,automaticeditscanbemadecompletelyunderprogramcontrol,yetDEdit'sinteractiveinterfaceisavailablefordirectuserinteraction.[Function]CompletelyreinitializesDEdit.ClosesallDEditwindows,sothattheusermustspecifythewindowthenexttimeDEditisenvoked.isalsousedtomakeDEditrecognizethenewvaluesofvariablessuchas,whentheuserchangesthem.20.1.3InteractiveOperationWhenDEditiscalledforthersttime,itpromptsforaneditwindow,whichispreservedandreusedforlaterDEdits,andprettyprintstheexpressiontobeeditedtherein.(Note:Theprettyprinterignoresuserbecausetheydonotprovideenoughstructuralinformationduringprintingtoenableselection.)AstandardInterlisp-Dscrollbarissetupontheleftedgeofthewindowandaneditcommandmenu,whichremainsactivethroughouttheedit,ontherightedge.DEditthengoesintoaselect,command,executeloop,duringwhichityieldscontrolsothatbackgroundactivities,suchasmousecommandsinotherwindows,continuetobeperformed.20.1.3.1SelectionSelectioninaDEditwindowisasfollows:thebuttonselectstheobjectbeingdirectlypointedat;thebuttonselectsthecontaininglist;andthebuttonextendsthecurrentselectiontothelowestcommonancestorofthatselectionandthecurrentposition.Theonlythingsthatmaybepointedatareatomicobjects(literalatoms,numbers,etc)andparentheses,whichareconsideredtorepresentthelisttheydelimit.Whitespaceisnotselectableoreditable.Whenaselectionismade,itispushedonaselectionstackwhichwillbethesourceofoperandsfor20.2(DC)EFEVEPDEDITMODE(EDITMODE)NILDISPLAYTELETYPEEDITLDEDITLEDITLDFEDITFDEDITLDEDITLEDITLTTY:EDITMACROS(RESETDEDIT)RESETDEDITDEDITTYPEINCOMSPRETTYPRINTMACROSLEFTMIDDLERIGHTFILEFILExNEWMODENEWMODENEWMODENEWMODE|b'#= *x\:6*=CZ5!9#%,/1`6kW +1y$<(Z*,1y 8>BGU    $*-4 59?2FTD  H $ *-' 5);=^BFyR ,UuO"#&c(,/-/Q3q4:O;>YBO  edeTo&@LC5 J "'d(t+H-268:?AHsIH?!O#)q-7"?AGG0D  of $' .4;P@BRE%B  V?<#w&/)V-0 9<AFAQ" ', 3{6/;=D>L  S=;Wg!(,%-02@48k; <  p p#(,N1<4?CF+;  aT !$&W)6*.e125X8r>ADIF!9[ MK!&{ -249;?B 6VC5 4  &i+]/16<+>@CgFx3 >#&)+,N0m1@B.DH01et%(_+f/17S:I/X %|+Z i <x& M*t# $v),H.M1#6:<`BE{%P  ,TW!f ()+/579<@E#  #&(-2} 8 @+D"   4 #%P)+- /61X3n58b;=?E(G ^   )$ +-h0t2k47;?BEH  {!F%@&*^.03k : @CE w!#c%R | xJ  2$q*/13y59=BG 0j #l&(/479,;@AEG $2#^&(v-?358=?BDX   F=%(<* 269 ?AG  '4f8  &E( $q5} "%&j,./368;Q?AG(o} L`m$x\: UE&GTD "OL J$IH8D6;BDAQ >L#kDO<o-j6 6V 3 7 1e@CGTZ  z p"$ +-5/3B5 = ?0AFX  #/(,\069:>TBDGWI  "&7)!.t15$9;>}A U >>f"(j),.05;[<@KR 62 $x( +-15;?ADHFP  *UL %+1.1n57`<~>B OR  p #F ),/247v;?EoG?M ( H$_),*.539<,>AC&GL n!{'%),&1d5|G xC= $%(u,`/2N6d7:CV>L  ke!%:&).2A68;_@<D\F<  j0z7 \"'-\0\2(6%8:@B|D;  !x~ZF!W"(-35<7:<<@JBD9[  8!%}'))-6V  j./$(+.2I6;@5AD<4  zJ39#i).11 3+ :h>K@CE[3 R e! +14 :<>A D+F1e f|- x( u +zl!&t([+.e0468=A_G&  v\  m"q&0+134A6;F?DR%P  O!h"&(+:/48:=2@sC.G# gc8L &h*C,.L7:y<BF"   [!|# -b2 :< ?K@F+ ^  )K|!"&Y  Y,!%(,.21&47>9>` E m"q$ +|O x aj*#%e(r+.06;N>O@BED ?<"#&,)-.06r7 @   , <d2"E%'*-z0)6t:@<?%D~  j!#F%)~-/i369b<AG4 S !(v*/"17 ?'DwF  t !# +)-e13]:>@ G((o"} `m$xA0>LW{#3 xDS} `m$x3 7(J.s;1e!} `m$Commandsremovingparenthesesasapair)arecommonlyused,soDEditprovidestheotherfourassubcommandsofthecommontwo.Thesubcommandsofacommandareaccessedbyselectingthecommandfromthecommandsmenuwiththebutton.Thiswillbringupamenuofthesubcommandoptionsfromwhichachoicecanbemade.Subcommandsareaggedinthelistbelowwiththenameofthetoplevelcommandofwhichtheyareoptions.IfonehasalargeDEditwindow,orseveralDEditwindowsactiveatonce,theeditcommandwindowmaybefarawayfromtheareaofthescreeninwhichoneisoperating.Tosolvethisproblem,theDEditcommandwindowisa``snuggleup''menu.Wheneverthekeyisdepressed,thecommandwindowwillmoveovertothecurrentcursorpositionandstaythereaslongaseitherthekeyremainsdownorthecursorisinthecommandwindow.Thus,onecan``pull''thecommandwindowover,slidethecursorintoitandthenreleasethekey(ornot)whileonemakesacommandselectioninthenormalway.Thiseliminatesagreatdealofmousemovement.Wheneverachangeismade,theprettyprinterreprintsuntiltheprintingstablizes.Asthestandardprettyprintalgorithmisusedandasitleavesnoinformationbehindonhowitmakesitschoices,thisisasomewhatheuristicprocess.Thecommandcanbeusedtotidytheresultupifitisnot,infact,``pretty''.Allcommandstaketheiroperandsfromtheselectionstack,andmaypusharesultbackon.Ingeneral,theruleistoselectselectionsrstandselectionssecond.Thus,acommandisdonebyselectingthethingtobereplaced,selecting(ortyping)thenewmaterial,andthenbuttoningthecommandinthecommandmenu.Usingtodenotethetopmost(mostrecent)elementofthestackandthesecondelement,theDEditcommandsare:[DEditCommand]Insertsacopyofafter.[DEditCommand]Insertsacopyofbefore.[DEditCommand]Deletesfromthestructurebeingedited.(Acopyof)remainsonthestackandwillappear,selected,intheeditbuer.[DEditCommand]Replaceswithacopyofobtainedbysubstitutingacopyofwhereverthevalueoftheatom(initially,thecharacter)appearsin.Thisprovidesanfacility,seeIdiomsbelow.[DEditCommand]Exchangesandinthestructurebeingedited.[DEditCommand]Putsparenthesesaroundand(whichcan,ofcourse,bethesameelement).[DEditCommand]Subcommandof.Insertsbefore(liketheEditcommand)[DEditCommand]Subcommandof.Insertsafter(liketheEditcommand)20.4MIDDLETABTABTABReprinttargetsourceReplaceReplaceAfterBeforeDeleteReplaceEDITEMBEDTOKEN&MBDSwitch()(in()(LI)in())RITOPNXTTOPNXTTOPNXTTOPTOPNXTTOPNXTTOPTOPNXTTOPNXTTOPTOP|b'&ex\:  ~6k "&*,W068<)?6@ Z   "$o%+.M35;Z=DGX $'*`.01@5693 AFyWI  $h/ %d',t.$0269HDP  [ !%-&*-u. 5q7;=ChEOR O# %+1+35: ;>SDM  Pfp4 _%(P+.0L3b58>]@FL  A M$(+w.2k4;Z@D,GJa 4!$m&)-8/4 51;A#BE%H  D\ pf $tE z@ &+&.g05 ;=@KED  yn#2%_ - 147.8= ? DZG!HBk E$5*-.236o8<{>?ABzE;F@ =  F//}i"%=*.1z479<@:BD<  dTu #* 06E:9AHs:t  UI/`I$)+025;t>#A@G8Uc!"%,.L253:>TBH&7)  Iu!$\(|/[4#>:B2~; %M+/x>:B-; %M,0*>:B)(#e%+/46:^;@EXG' t%N*,{.1$}>:B" W#X$j',913 :<?JC!1,"b2u 8s<| CH0.  #(-|/4e>:B!o'@(+J14>:B6 !)o/ 3q6<7:@|C0>:B T#$*149<>:B  T#$*038|;~(o!}$`m$xXOR.M;TJaBk{<y&^x;|8 4# /x * $} !1& :%  0 " )-7]  " )-6J!}$t`m$dx8)7)n2~"B(-"B))(<"Q)D@d$$6&,. -!}8`m$BINTERLISP-DDISPLAY-ORIENTEDTOOLS[DEditCommand]Removesparenthesesfrom.[DEditCommand]Subcommandof.Removesfrombefore(liketheEditcommand)[DEditCommand]Subcommandof.Removesfromafter(liketheEditcommand)[DEditCommand]Undoeslastcommand.[DEditCommand]Subcommandof.UndoesallchangessincethestartofthiscallonDEdit.[DEditCommand][DEditCommand]Subcommandsof.Allowsselectiveundoingofotherthanthelastcommand.BothofthesecommandsbringupamenuofallthecommandsissuedduringthiscallonDEdit.Whentheuserselectsanitemfromthismenu,thecorrespondingcommand(andif,allcommandssincethatpoint)willbeundone.[DEditCommand]Selects,inplaceof,therstplaceafterwhichmatches.UsestheEditsubsystem'ssearchroutine,sosupportsthefullwildcardingconventionsofEdit.[DEditCommand]Exchangesandonthestack,i.e.thestackischanged,thestructurebeingeditedisn't.Thefollowingsetofcommandsaregroupedtogetherassubcommandsofbecausetheyallaectthestackandtheselections,ratherthanthestructurebeingedited.[DEditCommand]Subcommandof.Scrollsuntilisvisibleinitswindow.[DEditCommand]Subcommandof.Discardsallselections(i.e.,``clears''thestack).[DEditCommand]Subcommandof.Putsacopyofintotheeditbuerandmakesitthenew.[DEditCommand]Subcommandof.Popsotheselectionstack.[DEditCommand]Reprints.[DEditCommand]RunsDEditonthedenitionoftheatom(oroflist).Usestodeterminewhatdenitionsexistforand,ifthereismorethanone,asks20.5()out(out()out(LO)out()out)ROUndo!UndoUndo?Undo&UndoUndo&UndoFindSwapSwapCenterSwapClearSwapCopySwapPopSwapReprintEditCARTYPESOFTOPTOPTOPTOPTOPNXTTOPNXTTOPTOPTOPTOPTOPTOPTOPTOP|b' #$+=3Ex\A>:BZ $*W>:BU ,&'.18;@0C R>:BQE D&'/2r8;@C N@>:BL5I>:BG T%h&n+-m268a;n=&?BMDQD>:BCD>:BA %&+T067;R>i@C+? ;'*,-135x7>BG>>S<N!%:'*.04!7:>>@ <!/&')0j36:=c?R9>:B8o"&y'r),0x6;CDG6\ "[&,-36)8 @o H&41>:B0 !P'(+E/1a378j> @nF.f+a  * S%+G- 6;AD'F+)  In GQ"t$*.P&>:B% T%h&o*1*268:d" >:B e T%h&o,- 47! `>:B \%w&)*.1358F;?*AF#G>:Bi T%h&o,.1K6d>:B >:B %'!#O)a*-;38:+>@G no #| *K-36A7;^<@CF(o }D`m$jx\A  qW U!$@->&R QE!$q-=N@ I G" D CD A"v<"9 1 +a7& %" "  e" ` " i" d   5Cw}D`m$|xZ(ZU6QE58#3@0 U#%./i)< 0;@DX>3"?',.3;5m8;>WAPC5 WI "(`-.3t6778;>KGUu"%X'(-~/8 8*<8?D$ES %$'*016a9B=U?oAH&RXt"5OR>:BM/ ~#(+246<@WEL$"Y$')-e/W1579=sEeJaph%)+-2t7*8; ?B H$&h,169 @;BDG6!# '/-0 87EG(Ep$'.0z28F>@C+ C@m %J',/69Z?)@ ?H j '*1'5k7:@CI=y:t>:B8+(*/ 89<@"5>:B4# ]!D%y)+*/q258:F=B,CE2~O 1% *,8.1V/x>:B-y" )+g0*>:B)(>:B' ! &O*P-25 =N@CF%  ="%,{/15j|!x Ux  a bu! #(%/0348=@DFWm  BV )+ 2<5 8p ?AE  ?$%(+036/<?qE G" F!_#&'-L4E6CG|K? #%(*v3-57;9BG4  aRds=!C"n%4*<-/5x6<A0  V9 '*-q379FCFT y 5!;"&(+0456:v<@k HR  WQt9#R(+.058<[> BQ<  DR^]"%',2+49 =uCGO  E "P%'z).F03D597:;u BDsM  vc "$&(+L.n 48n<>BoF GLK jp !j%(> IF Hu %,158<>A(EfG  H_%!$*,i05,@0DF:  L#%-'+-2578>E9  :"_#H',P048U;>@DZG7m  J   #&)`,/\:&?AB 5l3 $%%&*-347:>C4! !$& .2?=ADUG2|  I/v ,o$p*E. 057:^@4AG- ^"h #%&q'),+{-G147t9w=^Bz ,+  m!#%i(,R158#>Dv* 6 $(*s+07H8:=>B(  \w x"r(*c % ! "o$2&,r0P469 BDE$4  ~#'*G. 57 8:<@C+ "   dy"(.N4l<DYG 'w<!$:(?,C-0"4:Z= D2C  \(!w#(> T d /#L,3 9;?@E5H& p I!%)+/p138<?DFH0 OU!{*P+), 4H7\9>CdF7M Z*j#E)-b.24G8'/eUH_"?#',m.M38^;;A@D  s}" %*D- 369=?EsFV   _) $%(*m.0[46= Q !Up%N'y -/39z@IBC  # *-%05 >;B.EG(o} D`m$xDU.4;CA ! :D6H9Y;!&y7m 36975 +f.4!36T8:= ,+E&* U*")C/6>w>%m$nM ,E&)) !} D`m$~x  } `m$DEditParametersexpressionstobereplaced(anynumber),thenthereplacingexpression.Nowhitthecommandasmanytimesastherearereplacementstobedone.Eachwillpoponeselectionothestack,leavingthemostrecentlyreplacedexpressionselected.Asthelatterisnowacopyoftheoriginalsource,thenextReplacewillhavethedesiredeect,andsoon.20.1.4DEditParametersThereareseveralglobalvariablesthatcanbeusedtoaectvariousaspectsofDEdit'soperation.Althoughmosthavebeenalludedtoabove,theyaresummarizedhereforreference.[Variable]Initially.UsedinbothDEditandtheteletypeeditortoindicatethespecialatomusedasthe``embedtoken''.[Variable]Initially.ThedefaultbehaviorofthetopmostDEditwindowistoremainactiveonthescreenwhenexited.ThisisoccasionallyinconvenientforprogramsthatcallDEditdirectly,soitcanbemadetocloseautomaticallywhenexitedbysettingthisvariableto.[Variable]DenesthecontrolcharactersrecognizedascommandsduringDEdittypein.OnlyaccessedwhenDEditisinitialized,soDEditshouldbereinitializedwithifthisischanged.20.2INTERACTIVEBITMAPEDITINGOneimportantconceptoftheInterlisp-Ddisplaysystemistheideaofabitmap,arectangulararrayofbits.Whileworkingwiththedisplaysystem,itisextremelyusefultobeabletomanipulatebitmaps,textures,andcharacterbitmaps.Thefollowingfunctionsprovideaneasy-to-useinteractiveeditingfacilityforvarioustypesofbitmaps.[Function]Ifisabitmap,itisedited.Ifisanatomwhosevalueisabitmap,itsvalueisedited.Ifis,asksfordimensionsandcreatesabitmap.Ifisaregion,thatportionofisused.Ifisawindow,itisbroughttothetopanditscontentsedited.setsupthebitmapbeingeditedinaneditingwindow.Theeditingwindowhastwomajorareas:agriddededitareainthelowerpartofthewindowandadisplayareaintheupperleftpart.Intheeditarea,theleftbuttonwilladdpoints,themiddlebuttonwillerasepoints.Therightbuttonprovidesaccesstothenormalwindowcommandstorepositionandreshapethewindow.Theactualsizebitmapisshowninthedisplayarea.Ifthebitmapistoolargetotintheeditarea,onlyaportionwillbeeditable.Thisportioncanbechangedbyscrollingbothupanddownintheleftmarginandleftandrightinthebottommargin.Pressingthemiddlebuttonwhileinthedisplayareawillbringupamenuthatallowsglobalplacementof20.8ReplaceReplaceEDITEMBEDTOKEN&DEditLingerTNILDEDITTYPEINCOMS(RESETDEDIT)(EDITBM)NILEDITBM(SCREENBITMAP)EDITBMBITMAPBITMAPBITMAPBITMAPBITMAPBITMAP|b'$E(N x\:  #&(i.I 5z8:CZ  V"o "$R&=*.369f< ACFX S %+Y-f/3O478<(=@7E:WI  IV<!%(a*#|R ir xN   " #F%(=)-l268B=% CL  Eu!$) +.1+ IC H/"#&*-/48:?AFcF$CC At!I%+-O/49>;?ARE@8 #(V+b, 4O DGT> "#&n(P+-0 9R<@BG><! 9C 8B$ + 24< @EP6P!$)G* 1385<? F4"?#&>'|- i x)n  hQ "(#(-.14 57 <'=` DH&'  sV!&()04I68(;A= DR&# c  b&c,Q1L306&7:0 @E[$}  '|4!xC5 H %'(--3527:>BQCD,k$+/58;4 BEZg%I&(,/4BDTH\?h$&<',.03V6 7=NnX"$w&Z*03V7<?eBE6 !{ x"-$),^-205#69(=$?BDG  0G"J&+B-1L58;@VE    ) &)1..06)8<?D1ED   ?   bl9"Z%:(+-/2(47=@LEEG S#%(.*/25(8 ;=]?D ;""&),3/1269u=AH&(o }0`m$x\:=)Z-I H/C A<9 4 !x O,,06p  }0l`m$>x!x .,% }$`m$ INTERLISP-DDISPLAY-ORIENTEDTOOLStheportionofthebitmapbeingedited.Toallowmoreofthebitmaptobeeditingatonce,thewindowcanbereshapedtomakeitlargerorthecommanddescribedbelowcanbeusedtoreducethesizeofabitintheeditarea.Pressingthemiddlebuttonwhilenotineithertheeditareaorthedisplayarea(i.e.whileinthegreyareaintheupperrightorinthetitle)willbringupacommandmenu.Therearecommandstostopediting,torestorethebitmaptoitsinitialstateandtoclearthebitmap.Holdingthemiddlebuttondownoveracommandwillresultinanexplanatorymessagebeingprintedinthepromptwindow.Thecommandsaredescribedbelow:Copiesthechangedimageintotheoriginalbitmap,stopsthebitmapeditorandclosestheeditwindows.Thechangesthebitmapeditormakesduringtheinteractionoccuronacopyoftheoriginalbitmap.UnlessthebitmapeditorisexitedviaOK,nochangesaremadeintheoriginal.Stopsthebitmapeditorwithoutmakinganychangestotheoriginalbitmap.Setsallorpartofthebitmapto0.Anothermenuwillappeargivingachoicebetweenclearingtheentirebitmaporjusttheportionthatisintheeditarea.Thesecondmenualsoactsasaconrmation,sincenotselectingoneofthechoicesonthismenuresultsinnoactionbeingtaken.Setsallorpartofthebitmaptothecontentsithadwhenwascalled.Aswiththecommand,anothermenugivesachoicebetweenresettingtheentirebitmaporjusttheportionthatisintheeditarea.Allowsspecicationofthesizeoftheeditinggrid.Anothermenuwillappeargivingachoiceofseveralsizes.Ifoneisselected,theeditingportionofthebitmapeditorwillberedrawnusingtheselectedgridsize,allowingmoreorlessofthebitmaptobeeditedwithoutscrolling.Theoriginalsizeischosenhueristicallyandistypicallyabout8.Itisparticularlyusefulwheneditinglargebitmapstosettheeditgridsizesmallerthantheoriginal.Tesselatesthecurrentbitmapintheupperpartofthewindow.Thisisusefulfordetermininghowabitmapwilllookifitweremadethebackground(usingthefunction).Note:Thetileddisplaywillnotautomaticallychangeasthebitmapchanges;toupdateit,usethecommandagain.Putsthecurrentbitmapintoawindowandcallthewindowcommandonit.Thecommandimplementsdrawingwithvariousbrushsizesandshapesbutonlyonanactualsizedbitmap.Themodeisleftbypressingthebuttonandselectingthecommandfromthemenu.Atthispoint,youwillbegivenachoiceofwhetherornotthechangesyoumadewhileinmodeshouldbemadetothecurrentbitmap.Makesthelowerleftpartofthebitmapbecomethecursorandwillpromptyouforthe``hotspot''.Thebitmapeditingwindowcanbereshapedtoprovidemoreorlessroomforediting.Whenthishappens,thespaceallocatedtotheeditingareawillbechangedtotinthenewregion.Whenevertheleftormiddlebuttonisdownandthecursorisnotintheeditarea,thesectionofthe20.9GridSize_OKStopClearResetEDITBMClearGridSize_ShowAsTileCHANGEBACKGROUNDShowAsTilePaintPAINTPAINTPAINTRIGHTQUITPAINTCURSOR_|b' #$+=3Ex\:  O.N"$(e+-0468v=>BSDZ  |sG +I17;>y@pCEeX  IU ;!$ "(&(S+-/169|BG(Jd`%(M-d/4O8<<`@C IR^ "%*/^36A:>@pDFG\ #%t'DWJ!V%U*\/@178;@AQR$!+#l')+>04L6;??B@ODs?F"H'(+.357~9E;>B`EO>^!c" *.706&8:m<AvCmF<`"&f9[~Q C" $y)8*-d24D7 @kC%G7 'B,=03r48>$CE6<!&)+ ,/13  "$&)v+%-{2 5l:>ADE1e"L& '*<+1038/=>A+E/>5 $I&+.17W:<?TACyH0.! '*/2z38 @/BD^,sn. &[*r.'26);_=?-ADQG4*Qt ' z$Z)#*-b1|4x6J8>ACsG&# v!#'*../1U48;i C'G$})+0i36;>Ar "1:#)+6/1q3?,E1!%(*/Y2*47JAaG, L& .-36;?vBE{#'R,379*;=B#*&04'6;h=@BD_G4;V!#)*-p/57;?~F  "]$)H! #~&](*o/4,6:=d@ DG  =9$&U+A.0`26f8=AD?  Ii_!U#%+W-.0i25 : E "W&;) +/1W358+;>{@EG(o!} `m$xZ#.LM DW AQ 9[ :73 ' $}C"6A  <,/OE&&%;A? !} |`m$LDisplayBreakPackagedisplayofthebitmapthatiscurrentlyintheeditareaiscomplemented.Pressingtheleftbuttonwhilenotintheeditregionwillputthelowerleft16x16sectionofthebitmapintothecursorforaslongastheleftbuttonishelddown.[Function]Opensawindowthatallowstheusertoeditsmalltextures(4by4)patterns.Intheeditarea,theleftbuttonaddsbitstotheshadeandthemiddlebuttonerasesbitsfromtheshade.Thetoppartofthewindowispaintedwiththecurrenttexturewheneverallmousekeysarereleased.Thusitispossibletodirectlycomparetwotexturesthatdierbymorethanonepixelbyholdingamousekeydownuntilallchangesaremade.Ifisatextureobject,startswithit,otherwise,itstartswithwhite.[Function]Callsthebitmapeditor()onthebitmapimageofthecharacterinthefont.canbeacharactercode(asreturnedby)oranatomorstring,inwhichcasetherstcharacterofisused.20.3DISPLAYBREAKPACKAGEThedisplaybreakpackageallowseasieraccesstotheinformationavailableduringabreak,bymodifyingthefunctiontousethewindowsystem.Itisturnedoninthestandardsystembutcanbeturnedowiththefollowingfunction:[Function]Ifisnon-,installsthedisplaybreakpackage.Ifis,ituninstallsthedisplaybreakpackage,whichmakesbehaveasinInterlisp-10.returnsifthedisplaybreakpackagewaspreviouslyinstalled;otherwise.Thedisplaybreakpackagemaintainsatracewindowandasmanybreakwindowsasnecessary.Whenabreakoccurs,abreakwindowisbroughtupnearthettywindowoftheprocessthatbrokeandtheterminalstreamswitchedtoit.Thetitleofthebreakwindowischangedtogivethenameofthebrokenfunction,thereasonforthebreak,andthedepthofthebreakrecursions.Ifabreakoccursunderapreviousbreak,anewbreakwindowiscreated.Whileinabreakwindow,themiddlebuttonbringsupamenuofbreakcommands(,,,,,,,,and).Thecommandsandbringupabacktracemenubesidethebreakwindowshowingtheframesonthestack.showsframesforwhichis;showsallframes.Whenoneoftheframesisselectedfromthismenu,itisgreyedandthefunctionnameandthevariablesboundinthatframe(includinglocalvariablesandvariables)areprintedinthe``backtraceframe''window.Iftheleftbuttonisusedfortheselection,onlynamedvariablesareprinted.Ifthemiddlebuttonisused,allvariablesareprinted(variableswithoutnameswillappearas).The``backtraceframe''windowisaninspectwindow(seepage20.12).Inthiswindow,theleftbuttoncanbeusedtoselectthenameofthefunction,thenamesofthevariablesorthevaluesofthevariables.Afterselectinganitem,themiddlebuttonbringsupacommandmenuofcommandsthatapplytothe20.10(EDITSHADE)EDITSHADE(EDITCHAR)EDITBMCHCON1BREAK1(WBREAK)NILNILBREAK1WBREAKTNILEVALEVAL!EDITrevert^OKBTBT!?=BTBT!BTREALFRAMEPTBT!PROG*var*SHADESHADECHARCODEFONTCHARCODEFONTCHARCODECHARCODEONFLGONFLGONFLGN|b'"'+x\: s|!#& (+-] 7N<?*AF,Z  bt8{( "%L'4(k*R.03 7:<A&CeEH0X  I*UC5 TD" $(+$. /2Q5:<>p@ EGRm )"'*W,.147:>C9G>P!"=%*'*,|.4.5:=@]E9OR$%'@)/m24E5:<AG3M#A%7(+.138:>[@DGLIi %v2>59': ACFG\DWC5 BC!%+D,).0[48:<A H!),s.W/v5N8:@.G(H?e"$(+-06?A |8B iZx3  g5n"l&q(*s 17< =0AVCL27  =)0"'(*\.02V4:2>ACEp0  |-C5 +K%+&7*-2a6d<C[G|H*A  $(.(20;@BFC (%'C).`2<7:4 @ & #  !+"j%+-/37n=0> E"J 2"&Z%2'`*-/>46W8=@DG _k"$E&*s/16m8;=`ABE/ gA "%u)+_-1 9C:<5@,DHY v "T  T  $)+,/15@< ?DIOP: I#*,Q2&579&?KC4G  &!!$[+/,36CUEc  y(~#%O*p-0c457B;>^@F!  I! (y+18E >@EG \ !a%'=*x,/ 58'<BcDq  t n #&* 1%65:}=.AH  q/!3%++. 1e6?8#:@sBEo &  tcIc!3')]-/T17g9);?AhC !  =<8$j(*+2i6W8?AEG(!} `m$lxU I* DW `B&9A B27- +"D*A6b(($wFT<@E 6*/(:I DF4UqCm"} `m$fxU*IGDWSBBEA |;"&?e8U;-+W>hAqG!} D`m$FINTERLISP-DDISPLAY-ORIENTEDTOOLSselecteditem.Ifthefunctionnameisselected,achoiceofeditingthefunctionorseeingthecompiledcodewithwillbegiven.Ifavariablenameisselected,thecommandwillbeoered.Selectingwillavalueandsettheselectedtothevalueread.(Note:Theinspectorwillonlyallowthesettingofnamedvariables.Evenwiththisrestrictionitisstillpossibletocrashthesystembysettingvariablesinsidesystemframes.Itisrecommendedthatyouexercisecautioninsettingvariablesinotherthanyourowncode.)Iftheitemselectedisavalue,theinspectorwillbecalledontheselectedvalue.Theinternalbreakvariableissettotheselectedframeofthebacktracemenusothatthenormalbreakcommands,,andworkonthecurrentlyselectedframe.Thecommands,,,,andinthebreakmenucausethecorrespondingcommandstobe``typedin.''Thismeansthatthesebreakcommandswillnothavetheintendedeectifcharactershavealreadybeentypedin.Theoperationofthedisplaybreakpackageiscontrolledbythefollowingvariables:[Variable][Variable]Thevariables(default125)and(default300)controlthemaximumsizeofthebacktracemenu.Ifthismenuistoosmalltocontainalloftheframesinthebacktrace,itismadescrollableinbothverticalandhorizontaldirections.[Variable]Ifthevariableisnon-(defaultis),thenonerrorbreaksthecommandisexecutedautomatically.[Variable]Thebacktracemenuisprintedinthefont,whichisinitiallyGacha8.[Variable]Thesystemnormallyclosesbreakwindowsafterthebreakisexited.Ifis,breakwindowswillnotbeclosedonexit.Note:Inthiscase,theusermustcloseallbreakwindows.[Variable]Breakwindowsarepositionednearthettywindowofthebrokenprocess,asdeterminedbythevariable.Thevalueofthisvariableisaregionwhoseandareanosetfromtheandofthettywindow.Theandofdeterminethesizeofthebreakwindow.[Variable]Thetracewindow,,isusedfortracingfunctions.Itisbroughtupwhenthersttracingoccursandstaysupuntiltheuserclosesit.canbesettoaparticularwindowtocausethetracingformationtoprintoutthere.[Variable]Thetracewindowisrstcreatedintheregion.20.11INSPECTCODESETSETREADLASTPOSEDITrevert?=EVALrevert^OK?=MaxBkMenuWidthMaxBkMenuHeightMaxBkMenuWidthMaxBkMenuHeightAUTOBACKTRACEFLGAUTOBACKTRACEFLGNILNILBTBACKTRACEFONTBACKTRACEFONTCLOSEBREAKWINDOWFLGCLOSEBREAKWINDOWFLGNILBREAKREGIONSPECBREAKREGIONSPECLEFTBOTTOMLEFTBOTTOMWIDTHHEIGHTBREAKREGIONSPECTRACEWINDOWTRACEWINDOWTRACEWINDOWTRACEREGIONTRACEREGION|b' #$+=3Ex\: & Y!'l(,.3n5;e=9AuCZ  "}^"$%*A-/L47@[BDX !B#l%+,/826;8>DFWI  n/ !$'*l 02F36b;=`@CbGU G`!X"$, -/27<>%BH0S  4E"())*.1m7d:!<$@+BDDRX OR  ,,"#%'*b/358F>BDGM "#(,. 06d;@!BL H2yYH!Z%0),/) 8>@BG*Ja  K{"]% '*-*267 >iAFH  E  z$&" ,.07 BC A C ?e,14D=!(z+3,/h5:#;>cBPCFB<Z< 2!$U(*, 3g4659 @AE:t[ 7oC 5>/ 06j;?ADRFn4#Z&(Q. 1C /x %&+-s/>?CID-*C )(&P*/5G9;@BB2H\'( +,0i58:<@BE%tV!$(+t-b14"C !1!$h +V.1X39;=BH0 !"#569|=B?AG*H#,.i0S37_=EG@}'/i>MDG4^C ,-.2=49 ?A!BGJ_ %)h,$/y147@:>>-&  ',#-1o38G>@;CFC |"$g''+-/=s( }d`m$xxZ- =_XORMl&YL (B A ?e G 77o 5 3J=!4#$1 /x3 * ')`" ( &9@C@"Y)1' #k J@  45 }d``m$TheInspector20.4THEINSPECTORTheInspectorprovidesadisplay-orientedfacilityforlookingatandchangingarbitraryInterlisp-Ddatastructures.Theinspectorcanbeusedtoinspectalluserdatatypesandmanysystemdatatypes(althoughsomeobjectssuchasnumbershavenoinspectablestructure).Theinspectordisplaystheeldnamesandvaluesofanarbitraryobjectinawindowthatallowssettingofthepropertiesandfurtherinspectionofthevalues.Thislatterfeaturemakesitpossibleto``walk''aroundallofthedatastructuresinthesystematthetouchofabutton.Inaddition,theinspectorisintegratedwiththebreakpackagetoallowinspectionofanyobjectonthestackandwiththedisplayandteletypestructuraleditorstoallowtheeditorstobeusedto``inspect''liststructuresandtheinspectorto``edit''datatypes.Theunderlyingmechanismsofthedatainspectorhavebeenfactoredtoallowtheiruseasspecializededitorsinuserapplications.Thisfunctionalityisdescribedattheendofthissection.Note:Currently,theinspectordoeshaveing.Also,variableswhosevaluesarechangedwillnotbemarkedassuch.20.4.1InspectWindowsAninspectwindowdisplaystwocolumnsofvalues.Thelefthandcolumnliststhepropertynamesofthestructurebeinginspected.Therighthandcolumncontainsthevaluesofthepropertiesnamedontheleft.Forvariablelengthdatasuchaslistsandarrays,the``propertynames''arenumbersfrom1tothelengthoftheinspecteditemandthevaluesarethecorrespondingelements.Forarrays,thepropertynamesarethearrayelementnumbersandthevaluesarethecorrespondingelementsofthearray.Forlargelistsorarrays,ordatatypeswithmanyelds,theinitialwindowmaybetoosmalltocontainallofthem.Inthesecases,theunseenelementscanbescrolledintoview(fromthebottom)orthewindowcanbereshapedtoincreaseitssize.Inaninspectwindow,thebuttonisusedtoselectthings,thebuttontoinvokecommandsthatapplytotheselecteditem.Anypropertyorvaluecanbeselectedbypointingthecursordirectlyatthetextrepresentingit,andclickingthebutton.Thereisoneselecteditemperwindowanditismarkedbyhavingitssurroundingboxinverted.Thecommandsoeredbythebuttondependonwhethertheselectionisapropertyoravalue.Iftheselecteditemisavalue,thecommandsprovidedierentwaysofinspectingtheselectedstructure.Theexactcommandsthataregivendependonthetypeofthevalue.Ifthevalueisalitatom,thecommandsarethetypesforwhichtheatomhasdenitionsasdeterminedby.Sometypicalcommandsare:Editthedenitionoftheselectedlitatom.Inspectthevalue.Inspectthepropertylist.Ifthevalueisalist,therewillbechoiceofhowtoinspectthelist:20.12notUNDOLEFTMIDDLELEFTMIDDLEHASDEFFNSVARSPROPS|b1%x(O\8 ixW  ^#(l*/1`4&:? E(FV- { !:"'),25Q9=CT  y;! ( /2k8K=z?BG(R  "%)-/1 87:?h EGQ< u#b% &+m012*36S9` ?A]CHFO  Gs!') /248>?CV M  QnzW 4"'O* /; 5^9;?JAF9GLK  %  L "^(A). IF    #@)D,0&57l;4>A/B G n #; &8'-/^14p6(8D  d"(+/48=?aDGjB  |> i-x:,  ;4#O%),169;AEG8 a #'-H/35y7 >=BDG6   #5') 0/57j=@sACME5:  4H r"%" .4L6;W=CKG3  I`#&8( 17:8;O0  ax #'S+B-1{69;~=AtCG.  })%( )/158;W@BXD-D  ud1*?   8"I#&(,;08<>B(  < &"'+.$05E7D<? CPHF&  V t &,0 1489m<?DOGHs%N X1 !"H  MF"1&+-25.:<8=`BDE  q &(& +045 <@>C   +! &(R*./27@8;{?O@B?GW r P"&~) /1 9>@mAsEp $+%(@-haa%T  l p"$')\.0]("} @`m${Dx%^*?2&""HW;c   "} @0`m$.INTERLISP-DDISPLAY-ORIENTEDTOOLSOpensaninspectwindowinwhichthepropertiesarenumbersandthevaluesaretheelementsofthelist.Callstheteletypestructuraleditoronthelist.Callsthedisplayeditoronthelist.(IfthelistisinP-listform)Inspectsthelistasapropertylist.(Ifthelistisinlistform)Inspectsthelistasanassociation-list.Bringsupasubmenuwithallofthesinthesystemandinspectthelistwiththeonechosen.(Iftheisthenameofa)Inspectsthelistastherecordofthetypenamedinits.Ifthevalueisneitheralitatomoralist,theonlycommandis,whichopensaninspectorwindowontotheselectedvalue.Iftheselecteditemisaproperty,theuserwillbeaskedforanewvalueandtheselectedpropertywillbesettotheresultofevaluatingthereadform.Theevaluationofthereadformandthereplacementoftheselecteditempropertywillappearastheirownhistoryeventsandareindividuallyundoable.Propertiesofsystemdatatypescannotbeset.(Thereareoftenconsistencyrequirementswhichcanbeinadvertentlyviolatedinwaysthatcrashthesystem.Thismaybetrueofsomeuserdatatypesaswell.)20.4.2CallingtheInspectorTheinspectorcanbecalleddirectly,byusingthefunction:[Function]Createsaninspectwindowonto.Ifisgiven,itwillbetakenastherecordtypeof.Thisallowsrecordstobeinspectedwiththeirpropertynames.Ifis,thedatatypeofwillbeusedtodetermineitspropertynamesintheinspectwindow.speciesthelocationoftheinspectwindow.Ifis,theuserwillbepromptedforalocation.Ifisawindow,itwillbeusedastheinspectwindow.Ifisaregion,theinspectwindowwillbecreatedinthatregionofthescreen.Ifisaposition,theinspectwindowwillhaveitslowerleftcorneratthatpositiononthescreen.returnstheinspectwindowonto,orifnoinspectiontookplace.Thereareseveralwaystoopenaninspectwindowontoanobject.Inadditiontocallingdirectly,theinspectorcanalsobecalledbybuttoningancommandinsideanexistinginspectorwindow.Finally,ifanon-listiseditedwith,theinspectoriscalled.Thisalsocausestheinspectortobecalledbythecommandfromthedisplayeditororthecommandfromthestandardeditoriftheselectedpieceofstructureisanon-list.20.13InspectTtyEditDisplayEditAsPListAsAListASSOCAsRecordRECORD"arecordtype"CARTYPERECORDCARInspectINSPECT(INSPECT)NILNILINSPECTNILINSPECTInspectEDITVDeditEVOBJECTASTYPEWHEREOBJECTASTYPEOBJECTASTYPEOBJECTWHEREWHEREWHEREWHEREWHEREOBJECT|b' #$+=3Ex[*#) */1 8%:@aC6EYK#$'V h# )-/2 S h#')+wP/ "E#%).1N3566^;M. &)8-2^468: AeJ )&)5+',4L5W79g=@EAGI2 F!Z#'m)!238;G=?)AEGD ,!&7A  #h !$'1*u08u9=AC? @<  b LjP #&.(+. /+2 58S:?EOG;O   l L!]%A( .0U259;> EG9 I' $+'6+0 25% <Ca 8  -8#&) 0 9 =?A 6] #!$'),.w24; <|1 i"~x-  - X"R%(U3*C5 (#d(018:>*?BWD]H0'C<!@'({+/4o67=A DG%#^'X(>*-07:<?A~H#<!|#(%** ".$)+.+28?{CDsFMr"%T&,35 6W<=x@DBUEGN"()+&/2$6;>@EaG u%,w. /\5$7 @, F ^j %a*.0;5j7i=> ,Y}"g$W*29%=>C`  a!()+1307:=wAC    n!%y',027>:ADG   J`!#:$c'"(}`m$x[D V S P M M"EJ J/BF  qSF*G D#A2--* !,%$ @V9Cw,x`$ 5a}`m$bx*{(+3,'C"%2 :hM._#'QV2>!}$P`m$8ChoicesBeforeInspection[Function]Opensawindowanddisplaysthecompiledcodeofthefunctionusing.Thewindowisscrollable.20.4.3ChoicesBeforeInspectionForsomedatatypesthereismorethanoneaspectthatisofinterestormorethanonemethodofinspectingtheobject.Inthesecases,theinspectorwillbringupamenuofthepossibilitiesandwaitfortheusertoselectone.Forlitatoms,thechoiceincludesinspectingitsvalue,itsdenition,itspropertylist,itsoranyotheraspectreturnedfrom.Fors,thechoiceisbetweeninspectingthebitmap'scontentswiththebitmapeditor()orinspectingthebitmap'selds.Fors,thechoiceishowtoinspectitandisbetweenaonelevelinspector,theteletypeeditor()orthedisplayeditor().20.4.4RedisplayinganInspectWindowAninspectwindowisautomaticallyupdatedwhenthestructureitisinspectingischanged.Theinspectwindowcanbeupdatedbyselectingthe``''commandfromthemenubroughtupbypressingthebuttoninthetitleofthewindow.The``''commandwillcausethevaluesofthepropertiestobere-fetchedfromthestructureandredisplayed.20.4.5InteractionWiththeDisplayBreakPackageThedisplaybreakpackageknowsabouttheinspectorinthesensethatthebacktraceframewindowisaninspectwindowontotheframeselectedfromthebacktracemenuduringabreak.Thusyoucancalltheinspectoronanobjectthatisboundonthestackbyselectingitsframeinthebacktracemenu,selectingitsvaluewiththebuttoninthebacktraceframewindow,andselectingtheinspectcommandwiththebuttoninthebacktraceframewindow.Thevaluesofvariablesinframescanbesetbyselectingthevariablenamewiththebuttonandthenthe``''commandwiththebutton.Note:Theinspectorwillonlyallowthesettingofnamedvariables.Evenwiththisrestrictionitisstillpossibletocrashthesystembysettingvariablesinsidesystemframes.Exercisecautioninsettingvariablesinotherthanyourowncode.20.4.6ControllingtheAmountDisplayedDuringInspectionTheamountofinformationdisplayedduringinspectioncanbecontrolledusingthefollowingvariables:[Variable]Theinspectorprintsonlytherstelementsofalonglist,andwillmakethetailcontainingtheunprintedelementsthelastitem.Thelastitemcanbeinspectedtoseefurtherelements.Initially50.20.14(INSPECTCODE)PRINTCODEMACROTYPESOFBITMAPEDITBMLISTPEDITEDEDITnotredisplayMIDDLEredisplayLEFTMIDDLELEFTSetMIDDLEMAXINSPECTCDRLEVELMAXINSPECTCDRLEVELFNFN|b'!&+` x\:C5 ZV#o&,.5>8;=F7X6 "()x |T i xP%  {S!$#'*m+-\237<:F<ACa N  H0S"4$(*+/1J3 :=@BE;H0L  I  }9c $%)+| 139/;BCFAH/ .NL&"'*,.05 DsF  !h!! '*/43;-<?,CEH0D s-I  &K(-16T7D8;J?CH|@ i dRx<  k> #V(,/F5-68J >@G:t " <%(n028|;>|BzG8  B8]!$&L(.h1B9:ACG7) * I8"&(v.-0 |2 i rH!7%@x._  e2j"}$*,Y.2G5 7e=zAhFG, 1 "D%'+>.2m67C'  P! $u(v.J1.5f7+<>C.EG&#  _1 ^&+J.1M368>>A$} !x  "'u)A- 4R7;= DTEG? 6!'&*/!49n>9?D(,  4X| i +$o) xc   !% ,.0 7:=C ^C p G$#'.);AvC"D>GJt6!#v% ,/.5;s=@DqG_ lRA%P&)N-4+9G("}`m$x\: XI=pH/m!F6D2!DV{<-x:t)81)n'}&#"4oDO^ ,4 }`m$Nx\:ZC}l`m$INTERLISP-DDISPLAY-ORIENTEDTOOLS[Variable]Theinspectorprintsonlytherstelementsofanarray.Theremainingelementscanbeinspectedbycallingthefunctionwhichinspectsthethroughthe+elementsof.Initially300.[Variable]Ifis,theinspectorwillshowcomputedelds()aswellasregulareldsforstructuresthathavearecorddenition.Initially.20.4.7InspectMacrosTheInspectorcanbeextendedtoinspectnewstructuresanddatatypesbyaddingentriestothelist.Anentryshouldbeoftheform.isusedtodeterminethetypesofobjectsthatareinspectedwiththismacro.Ifisalitatom,thewillbeusedtoinspectitemswhosetypenameis.Ifisaoftheform,willbeedtotheitemandifitreturnsnon-,thewillbeusedtoinspecttheitem.canbeoneoftwoforms.Ifisalitatom,itshouldbeafunctionthatwillbeappliedtothreearguments(theitembeinginspected,,andthevalueofpassedto)thatshoulddotheinspection.Ifisnotalitatom,itshouldbealistofwheretheelementsofthislistaretheargumentsfor,describedbelow.Fromthislist,theargumentwillbeevaluated;theotherswillnot.Ifis,thevalueofthatwaspassedtowillbeused.Examples:Theentryonwouldcauseallobjectssatisfyingthepredicatetohavetheirpropertiesinspectedwithand.Inthisexample,shouldmakesuretheobjectisalitatom.Theentryonwouldcausealldatatypesoftypetobepassedtothefunction.20.4.8INSPECTWsTheinspectorisbuiltontheabstractionofan.Anisawindowwithcertainwindowpropertiesthatdisplayanobjectandrespondtoselectionsoftheobject'sparts.Itischaracterizedbyanobjectanditslistofproperties.Andisplaystheobjectintwocolumnswiththepropertynamesontheleftandthevaluesofthosepropertiesontheright.Ansupportstheprotocolthatthemousebuttoncanbeusedtoselectanypropertynameorpropertyvalueandthebuttoncallsauserprovidedfunctionontheselectedvalueorproperty.FortheInspectorapplication,thisfunctionputsupamenuofthealternativewaysofinspectingvaluesorofthewaysofsettingproperties.sarecreatedwiththefollowingfunction:20.15MAXINSPECTARRAYLEVELMAXINSPECTARRAYLEVEL(INSPECT/ARRAY)MAXINSPECTARRAYLEVELINSPECTALLFIELDSFLGINSPECTALLFIELDSFLGTACCESSFNSTINSPECTMACROS(.)LIST(FUNCTION)APPLYNILINSPECT()INSPECTW.CREATENILINSPECT((FUNCTIONMYATOMP)PROPNAMESGETPROPPUTPROP)INSPECTMACROSMYATOMPGETPROPPUTPROPMYATOMP(MYDATATYPE.MYINSPECTFN)INSPECTMACROSMYDATATYPEMYINSPECTFNINSPECTWINSPECTWINSPECTWINSPECTWLEFTMIDDLEINSPECTWARRAYBEGINOFFSETBEGINOFFSETBEGINOFFSETARRAYOBJECTTYPEINSPECTINFOOBJECTTYPEOBJECTTYPEINSPECTINFOOBJECTTYPEOBJECTTYPEDATUM-PREDICATEDATUM-PREDICATEINSPECTINFOINSPECTINFOINSPECTINFOOBJECTTYPEWHEREINSPECTINFOPROPERTIESFETCHFNSTOREFNPROPCOMMANDFNVALUECOMMANDFNTITLECOMMANDFNTITLESELECTIONFNWHEREPROPPRINTFNWHEREWHEREWHERE|b' #$+=3Ex\:C Z %.(+<?EGXL '-13z:<ADhWI38H=U) <BISPC OR*-r.18;K?UFAM "^%L&+/K1 7:=?CV L|G i-xC=  .& $( .p1Y79>C.EGA6 p"x$H&>Hs?  4}Q!$'6-U0|3+8B$CD>L /#'i+.2<= G4H<  *j7:J@BDHF;  UH$%('),.3J57y$/502?79=?AaG6V  T #&b*N 89<?9C4 x2ZP!## +757J9;<@wAFH3  91e'+.n4^6O9(;>)@G/Yu!%(\*218L:< CiE.  1 '*W-1b9t<> + (  7E&i  + 0(*-1" 7=G($v!F%)o,e.24B5k!  '48<>DF s-| ixO  N $%./9;_<BEZ  b"%A*n, 236:>@9A    C+ */41{5y79>BDG^ 6E*R H# *k,z.2 l ^^lm"} $-')9 /357O9=>C 8$E("}`m$x\: Z.IWI 1U+3P OR,MLA *;3=< )L _ 4 > <"'+`,0,0 5T; #7 &&R -6V0 D4, 43 G$&& 01v3 = 1e d /-=. "}<`m$INSPECTWs[Function]Createsanthatviewstheobject.Ifisa,itistakenasthelistofpropertiesoftodisplay.Ifisan,itisedtoandtheresultisusedasthelistofpropertiestodisplay.isafunctionoftwoargumentsthatshouldreturnthevalueofthepropertyof.Theresultofthisfunctionwillbeprinted(with)intheasthevalue.isafunctionofthreeargumentsthatchangesthepropertyofto.Itisusedbythedefaultandtochangethevalueofapropertyandalsobythefunction(describedbelow).Thiscanbeiftheuserprovidescommandfunctionswhichdonotcall.Eachreplaceactionwillbeaseparateeventonthehistorylist.Usersareencouragedtoprovideables.isafunctionofthreearguments)whichgetscalledwhentheuserpressesthebuttonandtheselecteditemintheisapropertyname.willbethenameoftheselectedproperty,willbethedatumbeingviewed,andwillbethewindow.Ifisastring,itwillgetprintedinthewhenthebuttonispressed.Thisprovidesaconvenientwaytonotifytheuseraboutdisabledcommandsontheproperties.,thedefault,willpresentamenuwiththesinglecommandonit.Ifselected,thecommandwillreadavaluefromtheuserandsettheselectedpropertytotheresultofuatingthisreadvalue.isafunctionoffourargumentsthatgetscalledwhentheuserpressesthebuttonandtheselecteditemintheisapropertyvalue.willbetheselectedvalue(asreturnedby),willbethenameofthepropertyisthevalueof,willbethedatumbeingviewed,andwillbethewindow.,thedefault,willpresentamenuofpossiblewaysofinspectingthevalueandcreateanewInspectwindowifoneofthemenuitemsisselected.isafunctionoftwoargumentswhichgetscalledwhentheuserpressesthebuttonandthecursorisinthetitleorborderoftheinspectwindow.Thiscommandfunctionisprovidedsothatuserscanimplementcommandsthatapplytotheentireobject.Thedefault()presentsamenuwiththesinglecommandand,ifitisselected,redisplays(using,describedbelow).speciesthetitleofthewindow.Ifis,thetitleofthewindowwillbetheprintedformoffollowedbythestring``Inspector''.Ifisthelitatom,theinspectwindowwillnothaveatitle.Ifisanyotherlitatom,itwillbeapplyedtotheandthepotentialinspectwindow(ifitisknown).Ifthisresultisthelitatom,theinspectwindowwillnothaveatitle;otherwisetheresultwillbeusedasatitle.Ifisnotalitatom,itwillbeusedasthetitle.isafunctionofthreeargumentswhichgetscalledwhentheuserreleasestheleftbuttonandthecursorisononeoftheitems.Theallowsaprogramtotakeactionontheuser'sselectionofanitemintheinspectwindow.Atthetimethisfunctioniscalled,theselecteditemhasbeen``selected''.Thefunction(describedbelow)canbeusedtoturnothisselection.willbethenameofthepropertyoftheselecteditem.20.16(INSPECTW.CREATE)INSPECTWLISTPATOMAPPLY()PRIN2INSPECTW()INSPECTW.REPLACENILINSPECTW.REPLACEUNDO(MIDDLEINSPECTWINSPECTWPROMPTWINDOWMIDDLEDEFAULT.INSPECTW.PROPCOMMANDFNSetSetEVAL()MIDDLEINSPECTWINSPECTWDEFAULT.INSPECTW.VALUECOMMANDFN()MIDDLEDEFAULT.INSPECTW.TITLECOMMANDFNRedisplayINSPECTW.REDISPLAYNILDON'TDON'T()INSPECTW.SELECTITEMDATUMPROPERTIESFETCHFNSTOREFNPROPCOMMANDFNVALUECOMMANDFNTITLECOMMANDFNTITLESELECTIONFNWHEREPROPPRINTFNDATUMPROPERTIESDATUMPROPERTIESDATUMFETCHFNOBJECTPROPERTYPROPERTYOBJECTSTOREFNOBJECTPROPERTYNEWVALUEPROPERTYOBJECTNEWVALUEPROPCOMMANDFNVALUECOMMANDFNSTOREFNPROPCOMMANDFNPROPERTYOBJECTINSPECTWPROPERTYOBJECTPROPCOMMANDFNPROPCOMMANDFNVALUECOMMANDFNVALUEPROPERTYOBJECTINSPECTWVALUEFETCHFNPROPERTYVALUEOBJECTINSPECTWVALUECOMMANDFNTITLECOMMANDFNINSPECTWOBJECTINSPECTWTITLECOMMANDFNINSPECTWTITLETITLEDATUMTITLETITLEDATUMTITLESELECTIONFNPROPERTYVALUEFLGINSPECTWSELECTIONFNPROPERTY|b'%xZC5 Y(%(Y, .]67ABeGHW} #$ +D13w8BICIU '),/1D4}6)8:@bO   LQS18;@J p!$"%'*:I;  ,"%'*v>9 EG  A8 '-1 3%5EFmE "]$&+.25+ <>dFDJADOy#1>?CE?  !$^'#).13=q>@$E=;/!&m2469=AG(A l= >CEK  J!&#&4*]+-0o2%48DH j J %'R)5,L-0?4:~ADh  <r"a &b)> E[ Z  {pbk0 (+<-1/3W57x=>A5Fc(} t`m$x\s Z2Y(eCWEUfR$1Q19BL#7I;0G{8!ECAD)?B6$ ? DJ AD  *,Y/2%7=  ,$*B  8. # B(B56q70% (u*-c/02.5S7K;| Z!f# &T"} @`m$HINTERLISP-DDISPLAY-ORIENTEDTOOLSwillbeiftheselecteditemisthepropertyname;iftheselecteditemisthepropertyvalue.indicateswheretheinspectwindowshouldgo.Itsinterpretationisdescribedin(page20.13).Ifnon-,isafunctionoftwoargumentswhichgetscalledtodeterminewhattoprintinthepropertyplacefortheproperty.Ifreturns,nopropertynamewillbeprintedandthevaluewillbeprintedtotheleftoftheothervalues.Aninspectwindowusesthefollowingwindowpropertynamestoholdinformation:,,,,,,,,,and.[Function]Updatesthedisplayoftheobjectsbeinginspectedin.Ifisapropertynameoralistofpropertynames,onlythosepropertiesareupdated.Ifis,allpropertiesareredisplayed.Thisfunctionisprovidedbecauseinspectwindowsdonotautomaticallyupdatetheirdisplaywhentheobjecttheyareshowingchanges.Thisfunctioniscalledbythecommandinthetitlecommandmenuofan.[Function]Usestheoftheinspectwindowtochangethepropertynamedtothevalueandupdatesthedisplayof'svalueinthedisplay.Thisprovidesafunctionalinterfaceforusers.[Function]Setstheselectediteminaninspectwindow.Theitemisinvertedonthedisplayandputonthewindowpropertyof.Ifhasa,itisdeselected.isthenameofthepropertyoftheselecteditem.isiftheselecteditemisthepropertyname;iftheselecteditemisthepropertyvalue.IfisNIL,noitemwillbeselected.(Thisprovidesawayofdeselectingitems.)20.5CHATisa``remoteterminal''facility,thatallowsonetocommunicatewithothermachineswhileinsideInterlisp-D.Thefunctionsetsupa``Chatconnection''toaremotemachine,sothateverythingyoutypeissenttothearemotemachine,andeverythingtheremotemachineprintsisdisplayedina``Chatwindow''.TheremotemachinemustsupportthePupTelnetprotocol.MultiplesimultaneousChatconnectionsarepossible.ToswitchbetweentypingtodierentChatconnections,simplybuttonwithintheChatwindowyouwanttouse.promptsforanewwindowforeachnewconnection,exceptthatitsavestherstwindowtoreuseoncetheconnectioninthatwindowisclosed(otherwindowsjustgoawaywhentheirconnectionsareclosed).20.17NILTINSPECTNIL()NILDATUMFETCHFNSTOREFNPROPCOMMANDFNVALUECOMMANDFNSELECTIONFNPROPPRINTFNINSPECTWTITLEPROPERTIESCURRENTITEMSELECTABLEITEMS(INSPECTW.REDISPLAY)NILRedisplayINSPECTW(INSPECTW.REPLACE)(INSPECTW.SELECTITEM)CURRENTITEMCURRENTITEMNILTCHATCHATCHATVALUEFLGWHEREPROPPRINTFNPROPERTYDATUMPROPERTYPROPPRINTFNINSPECTWPROPERTY_INSPECTWPROPERTYPROPERTYINSPECTWPROPERTYNEWVALUESTOREFNINSPECTWPROPERTYNEWVALUEPROPERTYPROPCOMMANDFNINSPECTWPROPERTYVALUEFLGINSPECTWINSPECTWPROPERTYVALUEFLGPROPERTY|b' #$+=3Ex\: y!$&Z(.j4 57=1@bADGZ W$)_+- 6r7>F!U R  B#%x(?=A7DH0Q> [IB"%'* 6F7AIO  A!^#'a* +02v47F8;Z>L  L5;!&,025 B5IJ(2=IIHS,@FCC5 D{$0%(R,06>?HsB`"#%':(.36-9 @6BH\AQ"#E% +q- 5e8b=?D?i"3$V& /r47U; G!%'2B8:^<?F9[^"6VC5 4#J$'*+79=?E[3  r"-0i5{7<DF71eS #)* 1'69Gj._C5 ,":%l'()&-369;A@BE/+d!`&5>>Gj)n"#$c% 4C58$;=@EG''1+,/84V7n8;!@F+G&#!J#)2-Y57T:<?BuD^$}6 !$&v -v|Y ix Z /!#(8*, 5/8Y<BEO UG\!#' .0d16!;=@r G)  va~]!@# *-,17b;T<BDE F= %(*/3  s! #&-O/4R:>@FX ?!i$),0 18>I@AD  - Az 1!r$'-).04 7;9 @fAD  V@!G$(= /2(!}X`m$xx\:2W?RI/;Q>F|L>C J   ) 3 > IH . FC *AQ;*$9[M6V .._ 0+,/ )n '(D OX4"}X`m$nx\:  1UW Ro/147O88Q>/1P48:0FC!#&)qD8AKBF8AQM6V  F!%3'+K,403 M&t)+>;?C(1e;= ._"$r'*H*,/+7@)n-.2' f!"%&#.0{3"}X`m$CHATbehavesasifitsChatwindowisaDatamedia-2500terminalofthedimensionsdeterminedbythesizeofthewindow.Hence,youcantalktohoststhatsupplyDatamediaserviceandexpectsomethingreasonabletohappen.Ifthehostdoesnotpayattentiontotheterminalspecicationprotocol,oryougothroughthathosttoanotherhost,youmayneedtoinformthehostofthedimensionsofyour``screen'';thesearegiveninthetitlebarofthechatwindow.ThefontshouldbeGacha10orotherxed-widthfontforproperDatamediaemulation.[Function]OpensaChatconnectionto,ortothevalueof.Ifrequireslogin,asdeterminedbywhetheritrespondstothe``whereisuser''protocol,suppliesaloginsequence,orifitdeterminesthatyouhaveasingledetachedjob,anattachsequence.Ifyouhavemorethanonedetachedjob,itsimplyperformsacommandforyouandallowsyoutoselectthejob.Youmayalternativelyspecifyoneofthefollowingvaluesfor:Alwaysperformalogin.Alwaysperformanattach.Thiswillfailifyoudonothaveexactlyonedetachedjob.LoginasuserGUEST,passwordGUEST.Donotattempttologinorattach.Ifissupplied,itiseitherastringorthenameofalewhosecontentswillbereadastypein.Whenthestring/leisexhausted,inputistakenfrom.Ifissupplied,itisawindowtousefortheconnection;otherwise,theuserispromptedforawindow.Whileisincontrol,allLispinterruptsareturnedo,sothatcontrolcharacterscanbetransmittedtotheremotehost.CommandscanbegiventoanactiveChatconnectionbybuggingthebuttonintheChatwindowtogetacommandmenu.Currentcommandsare:Closethisconnection.Oncetheconnectionisclosed,controlishandedovertothemainttywindow.ClosesthewindowunlessthisistheprimaryChatwindow.SameasClose,butalwaysleavesthewindowopen.Closesthecurrentconnectionandpromptsforanewhosttowhichtoopenaconnectioninthesamewindow.HoldtypeoutfromthisChatwindow.Buggingthewindowinanywayreleasesthehold.Thisismostusefulifyouwanttoswitchtoanother,overlappingwindowandthereistypeoutinthiswindowthatwouldcompeteforscreenspace.OpenatypescriptleforthisChatconnection(closinganypreviousdribbleleforthewindow).Theuserispromptedforalename;anameofjustclosestheolddribblele.Promptsforaletotakeinputfrom.Whentheendoftheleisreached,input20.18CHATCHAT(CHAT)DEFAULTCHATHOSTCHATWHEREISLOGINATTACHGUESTNONETCHATMIDDLECloseSuspendNewFreezeDribbleNILInputHOSTLOGOPTIONINITSTREAMWINDOW_HOSTHOSTLOGOPTIONINITSTREAMWINDOW|b''x\8  %f "#4 *-h247 >6 EGZ  vY #%)+0t7~<>C@X q|"$'8-.5: BOHWG   $/&*-|/=36P9[;'= DFU 4Z1!|$%(x+147{DXFAS  F$K! PC5 OPq (-..50#148UFH\Ml $&? -/46);=@DF7L!+&c'|*1245Z ?qB$D(F?c%a),2p<^%a)^+ .399Y%a'*0/804^6!6T!!"|(S)*./35[7;U<>@YDs4O>U!%),, 2|3 :>L?CsG17 &(,)*021469P @ G0"X$%, M %P',.0H37 >+@B +X   (S cn A# *e,I1|9<=?*ArD&   d%#` %e(+C 2+38<=BEG" 0"'%).25g69.>`Ac!.#( ,.s3# *-3456: =-?C>EHR  H"& M #]%)7.446;=6?BG \#')x,G/157= D[K$G%(-04:/CXE k!0 %k "$'+g/o358:y<?>@F6("}`m$x\8 X1P +OP:8LZH#MDA <^9Y4F,(S3#   M  V@Q  }l`m$VxP? #')OP)MG=@=6T 1@o }d@`m$2INTERLISP-DDISPLAY-ORIENTEDTOOLSrevertsto.Clearsthewindowandresetsthesimulatedterminaltoitsdefaultstate.Thisisusefulifundesiredterminalcommandshavebeenreceivedfromtheremotehostthatplacethesimulatedterminalintoafunnystate.InaninactiveChatwindow,thebuttonbringsupamenuofoneitem,,whoseselectionreopensaconnectiontothesamehostaswaslastinthewindow.ThisistheprimarymotivationfortheSuspendmenucommand.AnewChatconnectioncanalsobeopenedfromtheBackgroundmenu.Themousebutton,wheninside,holdsoutputaslongasthebuttonisdown.Holdingdowncoincidentallydoesthis,too,butnotonpurpose:sincethemenuhandlerdoesnotyieldcontroltootherprocesses,itispossibletokilltheconnectionbykeepingthemenuuptoolong.Chatwindowsarealittlebitknowledgableaboutwindowoperations.IfyoureshapeaChatwindow,Chatinformsyourpartnerofthenewdimensions.Andifyouclosethewindow,theconnectionisalsoclosed.ThefollowingvariablescontrolaspectsofChat'sbehavior:[Variable]Thetypeofdisplay(anumber)thatChatshouldtelltheremotehosttheuserison.IfDatamediaemulationisdesired,thisvariableshouldbesettothenumbercorrespondingtotheterminaltypeDatamediafortheremotehost.IftheremotehostdoesnotrespondtotheterminaltypeprotocolinPupTelnet,thisvariableisirrelevant.[Variable]Alistofhostnames,asuppercaselitatoms,thattheuserdesirestoChatto.Chattingtoahostnotonthelistaddsittothelist.ThesenamesareplacedinthemenuthatthebackgroundChatcommandpromptswith.[Variable]Iftrue,everyChatwindowisclosedonexit.If,theinitialsetting,thentheprimaryChatwindowisnotclosed.[Variable]Thehosttowhichconnectswhenitiscalledwithnoargument.[Variable]Ifnon-,thefontthatChatwindowsarecreatedwith.Ifis,Chatwindowsarecreatedwith.20.6THETEDITTEXTEDITORTEditisawindow-based,modelesstexteditor,capableofhandlingfontsandsomerudimentaryformatting.Textisselectedwiththemouse,andalleditoroperationsactonthecurrentselection.20.19TClearMIDDLEReConnectLEFTCHATMIDDLECHAT.DISPLAYTYPECHAT.ALLHOSTSCLOSECHATWINDOWFLGNILDEFAULTCHATHOSTCHATCHAT.FONTNILCHAT.FONTNIL(DEFAULTFONT'DISPLAY)HOST|b' #$+=3Ex\8Y3o#&*d,328:<}A=E@HsW=#)$03i6 EGAO >J  2!#';EC 9s$2%+.r16f8;A?BEkHs7S")_*027k@BLD6T "V$*<-T4S69=AGBE:4 >%{'().27p9;@CAHs3 0C .]v!-&( .47:H=BID;G,? "%]'Z)+/0`24Z7; ?CAEG+O (1+17P( C &g8 G#(*d.048*9;?}DLG$ 2%Y&)6!C |r' ,0Q137:?C k.sU!$'*027;hE I "'=U| i#x=  8!%*,6157; B    "q&p -/I1M38o (}`m$Lx\8Y3 R=J!mIF ;E 0 ( &g5!  #) k<F|* 5"}`m$Hx < }`m$TheTEditTextEditorThetop-levelentrytoTEditis:[Function]maybea(litatom)lename,anopen,astring,oranarbitrary[-able]Lispobject.Thetextisdisplayedinaneditingwindow,andmaybeeditedthere.Ifisotherthanalename,a,orastring,willcallonit,andletyouedittheresult.Ifis,youwillbepromptedtocreateawindow.Ifisnon-,willuseitasthewindowtoeditin.Ifhasatitle,willpreserveit;otherwise,willprovideadescriptivetitleforthewindow.willnormallyspawnanewprocesstoruntheedit,soyoucaneditinparallelwithotherwork;indeed,itispossibletohaveseveraleditingwindowsactiveonthescreen.Topreventanewprocessfrombeingcreated,callwithsetto.isaprop-list-likecollectionofpropertieswhichcontroltheeditingsession.Thefollowingoptionsarepossible:Thedefaultfonttobeusedintheeditwindow.Afunctiontocallwhentheusers.Afunctiontobecalledeachtimethruthecharacter-readloop.Afunctiontobecalledforeachcharactertypedin.Afunctiontobecalledeachtimeamouseselectionismadeinthiseditwindow.IfyouwantcharactersdisplayedotherthanTEdit'sdefaultway,setthistoacharactertable.Ifthisatomispresentinthelistof,thentheeditwindowwillberead-only,i.e.,youcanonlyshift-selectinit.Tellswhattextshouldbeselectedinitially.Thiscanbea(seebelow)describingtheselectedtext,oracharacternumber,oratwo-elementlistofrstcharacternumberandnumberofcharacterstoselect.Describesthemenutobedisplayedwhenthemousebuttonispressedintheeditwindow'stitleregion.Ifitisa,thatmenuwillappear.Ifitisalistofmenuitems,anewmenuwillbeconstructed.AfunctiontobecalledTEdithasquit.Thiscanbeusedforcleanupofside-eectsbyTEditclientprograms.20.20(TEDIT)STREAMMKSTRINGSTREAMTEDITMKSTRINGNILNILTEDITTEDITTEDITTEDITTEDITTFONTQUITFNQuitLOOPFNCHARFNSELFNTERMSAREADONLYanywhereSELSELECTIONMENUMIDDLEMENUAFTERQUITFNafterTEXTWINDOWDONTSPAWNPROPSTEXTTEXTWINDOWWINDOWWINDOWDONTSPAWNPROPSPROPS|b'"%),x\:  )lY5C5 W "8(*~.09:;@8B%D=U;"%*,/x068m:H>D;FTD!'.(,9/^026=*> ?@RO$&'*{,t/)14FOi#$'*\,~349:n@HsM"%(O)+.735e8S; BEdFLMw:$& 2(4: ;M BFE+GJGe%_)+.63557:a=?BEAH0E#',.{05v7M:?pD2DW D%P',-059^=BBB"$'w?("$3& -. 5:9F=@TD>| %c';%a(6,/1s3b68G:=d7%a&,a.04H6<4%a',.}047;C>k@ F3Q%a0K%a&,a. /36+9Y?<C-F%a&,B-/369:?5DF!+%a' ),m(%a&)- 3z9=@@lE9&%a(*-H.06#%a&);,-8W9<>4CDG"J%a(-=/148A:=~@CF  %a' %a(,K/35: @DFH-05# ;>SCFHT%a+{1@39478<?AC%a*-=2e4 :<0%a+.247#=A%a). /j4D585:@CH\^%a&(:,-04v7,\BEIG %a(*/14t8:>BH(}`m$&xY5 &W4xU TD8 E&RO!MfLM-WGDWE&B&;7940K-F(#{2x%aDO^)o  {4} }`m$pxY5*5 "$RWTD#YOYBcFM<@B A?M#?Ap"}H`m$HINTERLISP-DDISPLAY-ORIENTEDTOOLSAwindow-relativeregion;TEditwilluseonlythatportionofthewindowtodisplaytext&c.ThisisforpeoplewhowantTEditforllinginforms,etc.AfunctiontogetcalledinsteadofbringinguptheusualTEditcommandmenuwhentheuser-or-buttonsintheeditwindow'stitleregion.20.6.1SelectingTextTEditworksbyoperatingon``selected''piecesoftext.Selectedtextishighlightedinsomeway,andmayhaveacaretashingatoneend.Insertionsgowherethecaretis;deletionandotheroperationsareappliedtothecurrentlyselectedtext.Textisselectedusingthemouse.Therearetworegionswithinaneditwindow:Theareacontainingtext,anda``linebar''justinsidetheleftedgeofthewindow.Whilethemouseisinsidethetextregion,thecursoristhenormalup-and-leftpointingarrow.Whenthecursormovesintothelinebar,itchangestoanup-and-rightpointingarrow.Whichregionthemouseisindetermineswhatkindofselectionhappens:Themousebuttonalwaysselectsthesmallestthings.Inthetextregion,itselectsthecharacteryou'repointingat;inthelinebar,itselectsthesinglelineyou'repointingat.Themousebuttonselectslargerthings.Inthetextregion,itselectsthewordthecursorisover,andinthelinebaritselectstheparagraphthecursorisnextto.Thebuttonalwaysextendsaselection.Thecurrentselectionisextendedtoincludethecharacter/word/line/paragraphyouarenowpointingat.Forexample,iftheexistingselectionwasawhole-wordselection,theextendedselectionwillalsoconsistofwholewords.Therearespecialwaysofselectingtextwhichcarryanimplicitcommandwiththem:Ifyouholdthekeydownwhileselectingtext,thetextwillbeshownwhite-on-black.Whenyoureleasethekey,theselectedtextwillbedeleted.Youcanaborta-selection:Holddownamousebutton,andreleasethekey.Thenreleasethemousebutton.Holdingthekeydownwhilemakingaselectioncausesittobea``copy-source''selection.Acopysourceismarkedwithadashedunderline.Whateverisselectedasacopysourcewhenthekeyisreleasedwillbecopiedtowherethecaretis.Thisevenworkstocopytextfromoneeditwindowtoanother.Youcanabortacopy:Holddownamousebutton,andreleasethekey.Thenreleasethemousebutton.Holdingtheandkeysdownwhilemakingaselectioncausesittobea``move''selection,whichismarkedbymakingitveversevideo.Whateverisselectedasa``move''sourcewhentheandkeysarereleasedwillbemovedtowherethecaretis.Thisevenworkstomovetextfromoneeditwindowtoanother.Youcanabortamove:Holddownamousebutton,andreleasetheandkeys.Thenreleasethemousebutton.Ifthevariableisnon-,extendingaselectionwilldisplaytheselectionaswhite-on-black.Thenexttimesomethingistyped,theselectedtextwillbedeletedrst.20.21REGIONTITLEMENUFNLEFTMIDDLELEFTMIDDLERIGHTCTRLCTRLCTRLCTRLSHIFTSHIFTSHIFTCTRLSHIFTCTRLSHIFTCTRLSHIFTTEDIT.BLUE.PENDING.DELETENIL|b' #$+=3Ex\:%a&,159<?B(EZ%a'1).05u8C;C>s?BKFX%a(,.24s8U%a',.059;ACFATD%a)p/37:P@AHR%a*R+.\179|N9 i`xI  6r #E'})X,25b6 >K@CG(H/  4^e!M ')-03_5E:=E@ GF C  s1\"R$'=+0024:j=7@% FA  Ly"+ #^%'-P1o3879=@BG@8 c#Y'+.[269<>ACH0>   vw!%(H,-/{ 6h9<>mC; \m"%N*/14 6;=A{C9 !Qc- $' +-17e6 G?##')+.3!4r8;>@EFn5=  M_'g$A&*,3/@27 5!" )-24829@<BGG0 K C"&+.179g<APG4.   &p)+0Z26+  ; X" &)+069(  z=ytI" '*-6/249<>CG)'< O"O% ' ,/2J5:; ACDH% B> {#'-+. 2b" CI ?%&>+01S2469> E F F& $*,x13i47rAE[  I ^U $Z(-.S48O9;x=z>C O !&O,.3M5 6D;p?C |b!%'q+.1s36:>%?CFy  cE!%*&Z*.*13(7AHs tR!(!} `m$rx\:U TD=mC; 6 27 ('<72%" B9OE E^ 2 } `m$TEditingOperations20.6.2EditingOperationsInsertingtext:Exceptforcommandcharacters,whateveristypedonthekeyboardgetsinsertedwherethecaretis.Thekeyandcontrol-Abothactasabackspace,deletingthecharacterjustbeforethecaret.Control-Wisthebackspace-wordcommand.DeletingText:Hittingthekeycausesthecurrently-selectedtexttobedeleted.Alternatively,youcanusethe-selectionmethoddescribedabove.CopyingText:Use-selection,asdescribedabove.MovingText:Use--selection.Undoinganeditoperation:Thetopblankkeyisthekey.Itwillundothemostrecenteditcommand.isitselfundo-able,soyoucanneverbackupmorethanasinglecommand.Redoinganeditoperation:Thekeyisthekey.Itwillredothemostrecenteditcommandonthecurrentselection.Forexample,ifyouinsertsometext,thenselectelsewhere,hittingwillinsertacopyofthetextinthenewplacealso.Ifthelastcommandwasadelete,willdeletethecurrently-selectedtext;ifitwasafontchange,thesamechangewillbeappliedtothecurrentselection.Thecommandmenu:Youcangetcommandmenusbymovingintotheeditwindow'stitleregionandhittingtheormousebuttons.getstheusualmenuofwindowcommands.getsamenuofeditorcommands:Causesanupdatedversionoftheletobewritten.Teditwillaskyouforalename,oeringtheexistingname(ifany)asthedefault.Letsyoureadinanewletoedit,You'llbeaskedforalenameinthepromptwindow.Letsyoucopythecontentsofaleintotheeditwindow,insertingitwherethecaretis.Causestheeditortostopwithoutupdatingtheleyou'reediting.Ifyouhaven'tsavedyourchanges,you'llbeaskedtoconrmthis.Asksforasearchstring,thenhuntsfromthecarettowardtheendofdocumentforamatch.Selectstherstmatchfound;ifthereisnone,nothinghappens.Asksforasearchstringandareplacementstring.Withinthecurrentselection,allinstancesofthesearchstringwarereplacedbythereplacementstring.Ifyouwish,TEditwillaskyoutoconrmeachreplacementbeforeactuallydoingit.Changesthecharacterlooksoftheselectedcharacters:Thefont,charactersize,andface(bold,italic,etc.).Threemenuswillpopupinsequence:Onetoselectthefontname,onetoselecttheface,andonetoselectthesize.Youmayselectanoptionineachmenu.If,forexample,youwanttoleavethecharactersizealone,justclickthemouseoutsidethesizemenu.Ingeneral,anyaspectofthecharacterlooksthatyoudon'tchangewillremainthesame.PrintsthedocumenttoyourdefaultpressorInterPressprinter,with1inchmargins20.22BSDELCTRLSHIFTCTRLSHIFTUndoUndoESCRedoESCRedoRIGHTMIDDLERIGHTMIDDLEPutGetwithoutsavingtheoneyouwereworkingon.IncludeQuitFindSubstituteLooksHardcopy|b'#( \: i, xW Er &s,<-1^3T5;>UCyGV0  NUn j#?%y'.(_ /44y6<?rCF,T ? Q pC $'H -2U5"68> G)O  u%L u "7(\I  F  !%(r*04d6 8<?=BGE* n B"$'A+.L0\3788< B$ b '!/#%U+/03X69   SFk c$'x)+q-4d78R@ChG=3 mk!&{(,R035:s< >}CB :.  m!',>.v369TA=DFQG27 #3(8+-024/2 "#&)3*-!#$'F+,/ 3* #e(*+.]1J36<1ACTG(%L"$',2i474;w@BKE $7n$%')-/e4w!1 _"'5*p.Q14B7ACv $0&)M-n13P68@<A*Q"&T)*- 16::=6A Ge!`%)N,236> =B=CFX;7 #S%*-? 49E>WB46T%)+v-3C :k=e@Fk\!n%3(,1g4 69:ASDcF  #y%(+.E035'8;&>MALD?GD %n'Q)/l2*57B:=6C"EBw$$(+@-2E493;?AC A  $R(+0A2 $%(-b02r 8=@AD(!}`m$ xV03QOELIxMF,E*B$'@D ><87)6 3 /2 {./37W9<^? BGGx* % !1  6   }`m$lINTERLISP-DDISPLAY-ORIENTEDTOOLSallaround.ThefunctioncontrolswhichkindofprinterTEditwillsendto.CreatesaPressorInterPressleofthedocument,with1inchmarginsallaround.Theleformatisalsocontrolledby.20.6.3TEditFunctionalInterfaceTheTextStreamTEditkeepsawhichdescribesthecurrentstateofthetextyou'reediting.Youcanusemostoftheusualstreamoperationsonthatstream:,,,,,anddotheusualthings.insertsacharacterinthestreamjustinfrontofthenextcharacteryou'dreadifyouned.Youcangetthestreamby.Ifyouneedtosavethestateofanedit,youcansavethisstream.Callingwiththestreamastheargumentwillletyoucontinuefromwhereyoulefto.The``TextObject''TEditkeepsavarietyofotherinformationabouteacheditwindow,inadatastructurecalleda.Fieldofatextpointstotheassociated,whichcontainstheseeldsofinterest:Theeditwindowwhichcontainsthetext.Ifthisis,thereisnoeditwindowforthistext.Themostrecentselectionmadeinthistext.Ascratch,usedbythemousehandlerfortheeditwindow,butotherwiseavailableforscratchuse.Thecurrentlengthoftheeditedtext.Pointstothetextwhichdescribesthetext.Ifthisisnon-,TEditwillhaltafterthenexttimethroughthekeyboardpollingloop.Nocheckwillbemadeforunsavedchanges.Unlessitit,thevalueofwillbereturnedastheresultofTEdit.SelectionsTheselectedtextisdescribedbyanobjectoftype,whoseeldsareasfollows:Thecharacternumberoftherstcharacterintheselection.Therstcharacterinthetextbeingeditedisnumbered1.Thecharacternumberofthelastcharacterintheselection.Mustbe.Thenumberofcharactersintheselection.Ifiszero,thennocharactersareselected,andtheSelectioncanbeusedonlytodescribeaplacetoinserttext.20.23PRINTERMODEPressFilePRINTERMODESTREAMBINSETFILEPTRGETFILEPTRGETEOFPTRBACKBINPEEKBINBOUTBIN(WINDOWPROP'TEXTSTREAM)TEDITTEXTOBJF3STREAMTEXTOBJ\WINDOWNILSELSCRATCHSELSELECTIONTEXTLENSTREAMHINTSTREAMEDITFINISHEDFLGNILTEDITFINISHEDFLGSELECTIONCH#CHLIMCH#DCHDCHEdit-WINDOWTEXT|b' #$+=3Ex\:!059=>CRG4ZW!." )O+-Q/6f9{:=BDU|!E"%y +7-|Q iR /xM  J  ak"O$)s,.Z03n7<?BXDH&Hu  LY  'H09BAIF l"&'-/F158T9=3>A CE*  5o ;"$)KH7B$  o&14p"%A'*-r2i;?AbEG@ : $>(S+-z=y  :t  J #'*-]24m58z>"BI8 p # /M0)439=@Bj5Q"&,.h13L59:>g?AD4#1|!'+R,/.x%' *,/p4 9Z;>AG^,s#%*U)n|A#w%.'+&i}(,(2 4h!"L#&),B/m147<?EE: #"$&*-&28=0>@ADaH&r$'m)\.0268{m h  -' $+%01Z59 ;q=c i%'R),z2b46v <?BHH0 $&,| _%'=),136 <(?}AxF !~ '), 2Z68r;?A G &"8(*,/249;>@SD("}`m$x\:' W U- JHu$(' 1l :C F E*+E >" B$7.:tC 8 N)l5 7k1 . Y)n &i "#d ! @rh(c  C 3 }`m$|xE*5Z7< @  }`m$TEditInterfaceFunctionsTellswhethertheSelectionisindicatedintheeditwindow.If,itis;if,it'snot.Thethatdescribestheselectedtext.YoucanusethistogettotheStreamitself.TheXposition(edit-window-relative)oftheleftedgeoftherstselectedcharacter.TheYpositionofthebottomoftherstselectedcharacter(notthecharacter'sbaseline,thebottomofitsdescent).TheXpositionoftherightedgeofthelastcharacterselected.Ifiszero(a``point''selection),=.Thebottomofthelastcharacterintheselection.Thewidthoftheselection.Ifiszero,thiswillbealso.Thisisforafutureobject-orientededitinginterface.Tellswhichsideoftheselectionthecaretshouldappearon.Itwillbeoneoftheatomsand.ifthisselectioniscurrentlyvalid,ifitisobsoleteorhasneverbeenset.Whatkindofselectionthisis.Oneoftheatoms,,,or.A,whichwillbeusedtohighlighttheselecton.Howhighthehighlightingistoextend.Aselection'shighlightstartsatthebottomofthelowestdescender,andextendsupwardforpixels.Toalwaysgethighlightingafulllinetall,setthisto16384.ifthisselectionshouldhaveacaretashingnexttoit,otherwise.20.6.3.1TEditInterfaceFunctionsTEditexportsthefollowingfunctionsforuseincustominterfaces:[Function]Createsatextdescribing,andreturnsit.Ifisspecied,thetextwillbedisplayedthere,andanychangestothetextwillbereectedthereastheyhappen.Youwillalsobeabletoscrollthewindowandselectthingsthereasusual.maybeanexistingortext.Ifandaregiven,thenonlythesectionofdelimitedisedited.isthesameasfor.Giventhe,youcanuseanumberoffunctionstochangethetextinaneditwindow,underprogramcontrol.Theeditwindowgetsupdatedasthetextischanged.20.24ONFLGTNIL\TEXTOBJTEXTOBJX0Y0XLIMDCHXLIMX0YLIMDXDCHSELOBJPOINTLEFTRIGHTSETTNILSELKINDCHARWORDLINEPARAHOWTEXTUREHOWHEIGHTHOWHEIGHTHASCARETTNIL(OPENTEXTSTREAM)STREAMTEXTOBJSTREAMTEDITSTREAMTEXTWINDOWSTARTENDPROPSTEXTWINDOWTEXTSTARTENDTEXTPROPS|b'!%+x\8 L"()/136?ABFGZW!?$9*J,2-59,;>ASC/EGUURf!$1)M.0+2s479;>C OP!#&*,/U297=@C N7 '$&(}K2+!y#B%),f./03,9!?CE)H;I &o)}F|A #U%+-c/ C|Z "o (-.14~7'9@|(c#'-1 =w!#&+. 1i5:k<>xA%CEG;&m8a"$ )023[4:#;>XBEx5c H%(*t-u/,18=ATB0GN2#&(+-w3C5/ c ')_+/1{ 7=A7BE.v 9 ').4 >C?E|,q !"%C'*,/f1)la"'*[+.368=^ |% ux   !#A%'a, C5 &M 0C1538:BdCRR!<'P+)-0r57<9@FWOY!$'n*5, /04_6;>BFFWW![$a&T(H35=G>'Da! $&m*0t67A BkDH0#^$L'),5-p24u:<@@CgF/Gj#)}.14W99!}8`m$?ATCFzHX } %x%&m(+1^35^ ;R@B]DWIp !%x)*026H8:@U!#O%+e-1559k<=A CEGS%{PC5 OR'G+O1138Q=?ADM$JC5 I #I +,/l8 :3= @FIG\B#*-/4~6i9<BF$G?E ["$(+]/346;><?hD=Da}A !|xC5 ?e&C.3/0569=@}Dx= $|&*Y+01467:8<@/BFH\<}i!$&+Z-02^4 =CG:tM!&.'.C02"4_=#> @sC4D8 }5MxC5 4#}$'(U}+wx0O1:V;#=r@A`G42~}!x&( ,-V./2Q8*=F>AEC0N"g(+.057>8:@A H0/2},-xC5 *`",%R+1:;}>x@B8G(y# *,g0497:=?{@D6Ee'< %V'-247 9?A|C%`d"#(P)0"C5  &./17 89;?@DIE"$'/*- /14=y>D6E GZ!#u%*-q014E7g:<@AEEG$%+2+-E.13h58r:h<A)E OO}J(CxC5 X%)+0 7:=]@F} x"%'0149c;k?}FxHsX !$/'(.139;q<>CMD[EG "$b&){/]168;AE&G D" '3( /R02( }`m$x\: )Z7S!GP OR4J #IH*G\CE10A %=.A< :t55 %4#22~)),- '< %.T" 3xEA(J ,)4X?}`m$xx\:r"%Z%6-#/Xv!J>WIEPMJu!I50AE G\ !%E,DSA "?e"e)$CGF5r"4#"z),2~ "0%,-*-5=C"]L (r-W.' ({FHE69J`"$&*H.Z"@C D > }0`m$TEditInterfaceFunctionsisaproperty-list-likedescriptionofthechangestobemade.Thepropertynamestellwhattochange,andthepropertyvaluesdescribethechange.Anypropertywhichisn'tchangedexplicitlyretainsitsoldvalue.Thus,itispossibletomakeapieceoftextallboldwithoutchangingthefontsthetextisin.Thepossiblelistentriesareasfollows:Thenameofthefontfamily.Alltheselectedtextischangedtobeinthatfont.Thefaceforthenewfont.Thismaybeineitherofthetwoformsacceptableto:alistsuchas,oranatomsuchas.Thenewpointsize.Thevalueforthispropertymustbeoneoftheatomsor.Thetextwillbeunderscoredornot,accordingly.Thevalueforthispropertymustbeoneoftheatomsor.Thetextwillbeoverscoredornot,accordingly.Thevalueforthispropertymustbeoneoftheatomsor.Thetextwillbestruckthroughwithasinglelineornot,accordingly.Adistance,inpoints.Thetextwillberaisedabovethenormalbaselinebythatamount.Thisismutuallyexclusivewith.Adistance,inpoints.Thetextwillberaisedabovethenormalbaselinebythatamount.Thisismutuallyexclusivewith.Thevalueforthispropertymustbeoneoftheatomsor.Ifitis,thetextwillbeprotectedfrommouseselectionandfromdeletion.Thevalueforthispropertymustbeoneoftheatomsor.Ifacharacterhasthisproperty,theusercanmakeapointselectionjustafterit,evenifthecharacterisalso.[Function]mustbethetextstreamassociatedwitharunningTEdit.causestheeditingsessiontoend.Ifisgiven,itisreturnedasTEdit'sresult;otherwise,TEditwillreturntheusualresult.Theuserisnotaskedtoconrmhisdesiretostopediting.[Function]Addsamenuto.Thiswillupdatethemenu'simagesothatthenewly-addeditemwillappearthenexttimethemenupopsup.Thisisonlyguaranteedtoworkrightwithpop-upmenuswhicharen'tvisible.20.26FAMILYFACEFONTCREATE(BOLDITALICREGULAR)MRRSIZEUNDERLINEONOFFOVERLINEONOFFSTRIKEOUTONOFFSUPERSCRIPTSUBSCRIPTSUBSCRIPTSUPERSCRIPTPROTECTEDONOFFONSELECTPOINTONOFFPROTECTED(TEDIT.QUIT)TEDIT.QUIT(TEDIT.ADD.MENUITEM)NEWLOOKSSTREAMVALUESTREAMVALUEMENUITEMITEMMENU|b'!%+x\:Y "Z'*, 486&8>?B#GZF!#'Z).03?8=B{DX #&, 1637:<>\BCQDWIuI"G$ &) ,Y17{9=@ BDqGU#%'R%a(+-O/2\79G;@C'DsP%a'(*-uM%a(]+e-0L3^7B:=?AEGLM%a'+ 2Z>Q@wCJ1246:=0AbG%a(6+".D%a(-+-069w;]=?AHB'(+.L02 :L'(+.L02 9;>O ;G%a(-+-069w;]=?AH9'(+.1Y3`7<@ AMENH7%a(, 4%a'!-.4%7/:<?CMG3Q%a*/e1a4.9<>CD1%a0 .%a'!-.4%7/:<?CMG-%a*/e1a4.9<>CD+Z%a1(U%a(U,.s116:h>@CF,%a&*i0+26F8;=?EG,C5 hE "%',V 257#%BoDsG &#V&<*-04?6:>AEF   ^#''*?,/3p7z;X("}H`m$DxRMLM3 E&J%a+B>GDEB%a?E>L%a;GE9%a4 1(y.+Z(y (UG&';/:" G ^')%a h@ q "6!}H`m$tx\:?4h-p./q*! &!}0`m$2INTERLISP-DDISPLAY-ORIENTEDTOOLS[Function]Removesamenufrom.Thiswillupdatethemenu'simagesothatthenewly-addeditemwillappearthenexttimethemenupopsup.Thisisonlyguaranteedtoworkrightwithpop-upmenuswhicharen'tvisible.maybeeitherthewholemenuitem,orjusttheindicatorwhichappearsinthemenu'simage.20.6.3.2User-function``Hooks''inTEditTEditprovidesanumberofhookswhereauser-suppliedfunctioncanbecalled.Tosupplyafunction,attachittotheeditwindowundertheappropriateindicator,using.Everyuser-suppliedfunctionisedtothetextwhichdescribesthetext.Someofthesefunctionscanalsobesuppliedusingtheargumenttoor;thedescriptionsbelowcontainthedetails.[WindowProperty]Afunctiontobecalledwhenevertheuserendsaneditingsession.Thismaydoanything;ifitreturnstheatom,TEditwillnotterminate.AnyotherresultpermitsTEdittodoitsnormalcleanupandtermination.Thiscanalsobesuppliedusingtheargumenttoor.[WindowProperty]Afunctiontobecalledaftertheuserendsaneditingsession.Thismayperformanycleanupofsideeectsthatyoudesire.Thiscanalsobesuppliedusingtheargumenttoor.[WindowProperty]Afunctionthatgetscalled,foreectonly,eachtimethroughTEdit'smaincommandloop.Thiscanalsobesuppliedusingtheargumenttoor.[WindowProperty]Afunctionthatgetscalled,foreectonly,onceforeachcharactertypedintoTEdit.Thecharactercodeispassedtothefunctionasitssecondargument.Thiscanalsobesuppliedusingtheargumenttoor.[WindowProperty]Afunctionthatgetscalled,foreectonly,eachtimetheuserselectssomethingwiththemouse.Thenewispassedasthefunction'ssecondargument,andanatomdescribingthekindofselection(oneof,,,or)asthethird.Thiscanalsobesuppliedusingtheargumenttoor.[WindowProperty]CalledjustbeforeTEditscrollstheeditwindow.[WindowProperty]CalledjustafterTEditscrollstheeditwindow.[WindowProperty]CalledwhenTEditisabouttomovesometexto-screen.Thisfunctionmay20.27(TEDIT.REMOVE.MENUITEM)WINDOWPROPAPPLYSTREAMTEDITOPENTEXTSTREAMTEDIT.QUITFNDON'TPROPSTEDITOPENTEXTSTREAMTEDIT.AFTERQUITFNPROPSTEDITOPENTEXTSTREAMTEDIT.CMD.LOOPFNPROPSTEDITOPENTEXTSTREAMTEDIT.CMD.CHARFNPROPSTEDITOPENTEXTSTREAMTEDIT.CMD.SELFNSELECTIONNORMALCOPYMOVEDELETEPROPSTEDITOPENTEXTSTREAMTEDIT.PRESCROLLFNTEDIT.POSTSCROLLFNTEDIT.OVERFLOWFNMENUITEMITEMMENUITEMPROPS|b' #$+=3Ex\:C5 Z&-.249<@E)GX "=%s(/,/62V57;?PBEHFWI  $'*-n/4 8,< DGUC"w&*0,.1p7];@BE$S|O V xK4  v#%'-357<1>bBDI P " ) 04<_=WAfDRG l0#'-/3P7-8<BEGFC p&U347! >BGD A=C?D "&,/F2O57L  o%'o//36s8 ?BF< j" $%*/2@ :#=/?BmDR;M"a(.WA|D4b!p$b(+.o3H6|9"< >CG3 ^"(6l0=C._S"u%*M,048F;AIFc,!%'*,295=.Ce+%,(=C&if"% ), /379<CG$1$(M)../2M79;g?F#*$^'/ 5(;I =CrM!$)+q/?269X;>C@!$v/C046q8 >Ca'| ( &)[,.4D7>jBGH"&X),6/1,6:AH0^)=C0"&*-V0+=C!%),D/ =C 3 $:%)+/36w8=A1F( }`m$Jx\: $I3 GFC!( A >L*;*20 7 3 $/* 0 ,8cE&+i ( #*W6=?  'I'9`?hC=  +  }X`m$vx\:?!Z# *IWIA1FCf"}H`m$"ChangingtheTEditCommandMenuhandlethetextoverowitself(saybyreshapingthewindow),oritmayletTEdittakeitsnormalcourse.Ifthefunctionhandlestheproblem,itmustreturnanon-result.IfTEditistohandletheoverow,thevaluereturnedmustbe.[WindowProperty]Calledwhenevertheuserpressestheormousebuttonintheeditwindow'stitleregion.Canalsobesuppliedusingtheargumenttoor.Normally,thisisthefunction,whichbringsuptheusualTEditcommandmenu.TEditalsosavespointerstoitsdatastructuresoneacheditwindow.Theyareavailableforanyuserfunction'suse.[WindowProperty]Thewhichdescribesthecurrenteditingsession.[WindowProperty]Thetextwhichdescribesthetextofthedocument.20.6.3.3ChangingtheTEditCommandMenuYoumayreplacethe-buttoncommandmenuwithoneofyourown.Whenyoupressthebuttoninsideaneditwindow'stitleregion,TEDITcallsthevalueofthewindowpropertywiththewindowasitsargument.Normally,whatgetscalledis,butyoumaychangeittoanythingyoulike.bringsupamenuofcommands.Iftheeditwindowhasaproperty,thatmenuisused.Ifnot,TEditlooksforthewindowproperty(alistofmenuitems)andconstructsamenufromthat.Failingthat,ituses.Thismeansthatyoucancontrolthecommandmenubysettingtheappropriatewindowproperties.Alternatively,youmayaddyourownmenubuttonstothedefaultmenu,.willaddtotheTEditmenu.Menuitemsshouldbeintheform,whereiswhatappearsinthemenu,andwillbeappliedtothetextstream,andcanperformanyoperationyoudesire.Finally,youmaymenuitemsfromthedefaultmenu,bydoingcanbeeitheracompletemenuitem,orjustthetextthatappearsinthemenu;eitherwilldothejob.20.6.3.4VariablesWhichControlTEditThereareanumberofglobalvariableswhichcontrolTEdit,orwhichcontainstateinformationforediting20.28NILNILTEDIT.TITLEMENUFNLEFTMIDDLEPROPSTEDITOPENTEXTSTREAMTEDIT.DEFAULT.MENUFNTEXTOBJTEXTOBJTEXTSTREAMSTREAMMIDDLEMIDDLETEDIT.TITLMENUFNTEDIT.DEFAULT.MENUFNTEDIT.DEFAULT.MENUFNTEDIT.MENUTEDIT.MENU.COMMANDSTEDIT.DEFAULT.MENUTEDIT.DEFAULT.MENU(TEDIT.ADD.MENUITEMTEDIT.DEFAULT.MENU)()remove(TEDIT.REMOVE.MENUITEMTEDIT.DEFAULT.MENU)ITEMITEMNAMEFUNCTIONNAMEFUNCTIONITEMITEM|b'$&*1Lx\:/!O&*I-%/%5e7=?@CEZ!'F(+1>6{9?+@DSHX":#')n+;/2[8o:>DiGWI,TD=CR "C$',_2:>BDGP {%I(8+,261=MCuOR%%%,s/ 0o2IM!$H'+2'J   'R){,/59t;AD$FI <E=CDW $*-+16AQ=C?|"&,/ 13v5|;G 5"x6  [ n&*m-g/148#<>B5= _dX'$)w,.24WD3 uX#*p-0|4cFG^1  EH. "$ (C*U,247[:u<?BDG-FSS?";%)f+u-/2HY+  '  #'a*/]23E(  ?zd!(,.36 =C & k !!$)+-2E  o# &+-.1@AE  s P&)L+X0Z2$47pBEnG | $)x !  !3!|%p*.6/38; CEE(}@`m$xXfWITD R.4P8E&ORb 83E DW|AQ ?16DO5=635. -F 8 +6&6# - 4b@ {x ?0B }@H`m$lx#* >599EE{-6 }(`m$$INTERLISP-DDISPLAY-ORIENTEDTOOLSsessionsinprogress:[Variable]Ifthisisnon-,extendingaselectionmakesitintoapending-deleteselection.Seetheselectionsection.[Variable]A.ThisisthefontfordisplayingTEditdocumentswhichdon'tspecifytheirownfontinformation.[Variable]Aparagraph-looksdescription.Thiscontainsthedefaultlooksforaparagraph.[Variable]A.ThisisthemostrecentregularselectionmadeinTEditwindow.[Variable]A.Thisisthemostrecent-selectionmadeinTEditwindow.[Variable]A.Thisisthemostrecent--selectionmadeinTEditwindow.[Variable]Areadtable,thisisusedtotranslatetyped-incharactersintoTEditcommands.SeethesectiononTEditreadtables.[Variable]ThereadtablewhichcontrolsTEdit'sconceptofwordboundaries.ThesyntaxclassesinthistableaslodeterminewhichcharactersTEditthinksarewhitespace(whichgetsdeletedbycontrol-Walongwiththeprecedingword).20.6.4TEdit'sTerminalTableandReadtablesTEditnowpaysattentiontothesystemterminaltable.Characterswithterminalsytax-classes,,oractasfollows:actsasacharacter-backspace.actslikecontrol-W(infact,thisishowcontrol-Wisimplemented.)actslikeDEL.Sincethesystemterminaltableisusedtoimplementthesefunctions,youcanassignthemtootherkeysatwill.TEditalsohasaReadtable,whichitusestodispatchtocommands.Thetableisnamed,anditisglobal.Youcanusethefunctionsandtoreaditandmakechanges:[Function]Setsthereadtablesyntaxofthecharacterwhosecharcodeistobe20.29TEDIT.BLUE.PENDING.DELETENILTEDIT.DEFAULT.FONTFONTDESCRIPTORTEDIT.DEFAULT.FMTSPECTEDIT.SELECTIONSELECTIONanyTEDIT.SHIFTEDSELECTIONSELECTIONSHIFTanyTEDIT.MOVESELECTIONSELECTIONCTRLSHIFTanyTEDIT.READTABLETEDIT.WORDBOUND.READTABLECHARDELETEWORDDELETELINEDELETECHARDELETEWORDDELETELINEDELETETEDIT.READTABLETEDIT.SETSYNTAXTEDIT.GETSYNTAX(TEDIT.SETSYNTAX)CHARCODECLASSTABLECHARCODE|b' #$+=3Ex\: Y5C W4Y"#)+05 6m9P:?C U:"8RC Q>$%(),C/1? 7;BXFLO?"%p LC J1 #= *-3A5:B=@A@ GC FC !V$J%'+.39<@D_C=C A !P$A%'*339<@D_>C < !$&(l+3<78a=AE;G8BC 6S r#3$()/3P5 ;>B4:!0#4' 1C 0K!k%*/56: BE.  t#&-K1d 7;?B`F+-)#%*a,D035u;|( i9 x$7  ~v ! &T*- 039 L G FC{>'xC= A .{>-x> <./3{Cax8B 1 $7@ "     =+#23T (i"}D``m$lx 4$}%< >A!}`m$TEdit'sTerminalTableandReadtablesintheread-table.Thepossiblesyntaxclassesarelistedbelow.[Function]ReturnstheTEditsyntaxclassofthecharacterwhosecharcodeis,accordingtotheread-table.Thepossiblesyntaxclassesarelistedbelow.Anillegalsyntaxwillbereturnedas.Theallowablesyntaxclassesare:TypingthischaracteractslikebackspaceTypingthischaracteractslikecontrolWTypingthischaracteractslikeTypingthischaractercausesTypingthischaracteractslikeTypingthischaractercallsaspeciedfunction(seebelow)Typingthischaractersimplyinsertsitinthedocument.alsohasthiseect.Youcanalsocauseakeystroketoinvokeafunctionforyou.Todoso,usethefunction[Function]SetsuptheTEditreadtablesothattypingthecharacterwithcharcodewilltothetextandtheforthedocumentbeingedited.Thefunctionmayhavearbitraryside-eects.Theabbreviationfeaturedescribedbelowisimplementedusingthisfunction-callfacility.Finally,TEditusesthereadtabletodecidewherewordboundariesare.Whenevertwoadjacentcharactershavedierentsyntaxclasses,thereisawordboundarybetweenthem.Thestateofthistablecanbecontrolledbythefunctions[Function]Returnsthesyntaxclass(asmallinteger)foragivencharacter.maybeeitheracharacteroracharcode;defaultsto.[Function]Setsthesyntaxclassforacharacter.Again,iseitheracharacteroracharcode;defaultsto;maybeeitherasmallintegerasreturnedby,oroneoftheatoms,,or.Thoserepresentthesyntaxclassesinthedefault.Theinitialassignseverycharactertooneoftheaboveclasses,alongprettyobviouslines.Forpurposesofcontrol-W,whitespacebetweenthecaretandthewordbeingdeletedisalsoremoved.20.30(TEDIT.GETSYNTAX)NILCHARDELETEWORDDELETEDELETEDELUNDOUndoREDOESCFNNONENIL(TEDIT.SETFUNCTION)APPLYSTREAMTEXTOBJTEDIT.WORDBOUND.READTABLE(TEDIT.WORDGET)TEDIT.WORDBOUND.READTABLE(TEDIT.WORDSET)TEDIT.WORDBOUND.READTABLETEDIT.WORDGETWHITESPACETEXTPUNCTUATIONTEDIT.WORDBOUND.READTABLETEDIT.WORDBOUND.READTABLECLASSTABLECHARCODETABLECHARCODETABLECHARCODEFNTABLETABLECHARCODEFNCHARTABLECHARTABLECHARCLASSTABLECHARTABLECLASS|b'"(,c/ x\:#*T+/.3A7;>)AY5C5 W#(8+-066:@IUk!$,,/48=0?pCGTD"$*.OQ>  pN9_$'*@K4_$'*@H/_$'E*_$B$_$'?_$').4,6<_$)M-.02<?B&D9  J%H#k$* ,D/{13582:6C5 4j#.038:@D2()+36?A5Cv1n "(f+g.4K7.  Kp#y$ -.03s8;e+  46; ?5B )n  S "G%+8/4N79a:>2Ds'  O= , &(+$C5 ##(&<'+D0;2\3k7 A8DE!x t!,S1zH(rC5 g!%W')= 0g9M:?#@FH'"(3?DGJ!.&(-;<9>EA7C8E $A%004:=IAEG61L0  &\*.46g9:=SA`F!  ( y%'C .3o58;=AZE   V (}`m$xY5 #TD+N9 K4 H/ *@E* )B$ *@? < 96 (2!a.8+;$ !x3'r #d'*0(  & 6J0 }0`m$lx\:&h''Y54 WB;EU((6J!$$4j)*2%$#=_!x'(rx 75'7@B}p`m$fINTERLISP-DDISPLAY-ORIENTEDTOOLS20.6.5TheTEditAbbreviationFacilityThelistisalistof``abbreviationsknowntoTEdit.''Eachelementofthelistisadottedpairoftwostrings.Therstistheabbreviation(casedoesmatter),andthesecondiswhattheabbreviationexpandsto.Toexpandanabbreviation,selectitandtypecontrol-X.Itwillbereplacedbyitsexpansion.Youcanalsoexpandsingle-characterabbreviationswhiletyping.Hittingcontrol-Xwhennocharactersareunderlined(i.e.,afteryouhavetypedsomething)willexpandtheabbreviationtotheleftofthecaret.Hereisalistofthedefaultabbreviationsandtheirexpansions:Thebullet()TheM-dash()Theguredash()Opendouble-quotes(``)whichcanbematchedbytwonormalquotes('')20.7THETTYINDISPLAYTYPEINEDITORTTYINisanInterlispfunctionforreadinginputfromtheterminal.Itfeaturesaltmodecompletion,spellingcorrection,helpfacility,andfancyediting,andcanalsoserveasagloriedfreetextinputfunction.Thisdocumentisdividedintotwomajorsections:howtouseTTYINfromtheuser'spointofview,andfromtheprogrammer's.TTYINexistsinimplementationsforInterlisp-10andInterlisp-D.Thetwoaresubstantiallycompatible,butthecapabilitiesofthetwosystemsdier(Interlisp-Dhasamorepowerfuldisplayandallowsgreateraccesstothesystemprimitivesneededtocontroliteectively;italsohasamouse,greatlyreducingtheneedforkeyboard-orientededitingcommands).Descriptionsofbothareincludedinthisdocumentforcompleteness,butInterlisp-Dusersmayndlargesectionsirrelevant.20.7.1EnteringInputWithTTYINTherearetwomajorwaysofusingTTYIN:(1)setto,sotheLISPXexecutiveusesittoobtaininput,and(2)callfromwithinaprogramtogathertextinput.Mostlythesamerulesapplytoboth;placeswhereitmakesadierencearementionedbelow.Thefollowingcharactersmaybeusedtoedityourinput,independentofwhatkindofterminalyouareon.ThemoreTTYINknowsaboutyourterminal,ofcourse,thenicersomeofthesewillbehave.Somefunctionsareperformedbyoneofseveralcharacters;anycharacterthatyouhappentohaveassignedasaninterruptcharacterwill,ofcouse,notbereadbyTTYIN.Thereisa(somewhatinelegant)wayofchangingwhichcharactersperformwhichfunctions,describedunderlateron.control-A,,20.31TEDIT.ABBREVSsingle-characterbmn"LISPXREADFNTTYINTTYINTTYINREADMACROSBSDEL|b' #$+=3E\: i@) $xW  y ."+Q/17e:@XB8DG!HV0 O<  "0$ ,03c8;t=BDGT 4z }"s *./25:N<9=@fB\GR  O  kH!@ )-27T;=A]Cv N9  > 5Az0u#I *`- 1= EGL  _tI  \+@ #N&)G F|e}xC|I![@|e!"=ym$]&*-/4693=BM|6V i$Ux1 i  r%)b,/|57<Bd 0K 7 J!%*-037Q98:@@CEF6. g"%E)9.135:>W@DH&-  |1 ) k! &(o+0 02584: Bz (U  j !%C +%,/80`39>hAEE&    !#(F) 0247T8=@AG%  S  ' /1p47<>A-G#d  ""%t(- | ix h)2o ,%'39:<?6C  9)*$H'+-24Q8;>?lDFcO  E l$%G+-4J   LTK!#@&)G-P 5@6:`=?TDG  }U, #H)*/z15M8:>#@F  rNg. $ +.y4{7e:8?<ADiX   gTb#"O$&)+1I5R67> EFH&  4# )0A"DE  ( }`m$xWN {N9498xF C @ =y *' 5 4 r!}L`m$8EnteringInputWithTTYINDeletesacharacter.Atthestartofthesecondorsubsequentlinesofyourinput,deletesthelastcharacterofthepreviousline.control-WDeletesa``word''.Generallythismeansbacktothelastspaceorparenthesis.control-Q(control-UforTops20users)Deletesthecurrentline,orifthecurrentlineisblank,deletesthepreviousline.control-RRefreshesthecurrentline.Twoinarowrefreshesthewholebuer(whendoingmulti-lineinput).Triestocompletethecurrentwordfromthespellinglistprovidedto,ifany.Inthecaseofambiguity,completesasfarasisuniquelydetermined,orringsthebell.Forinput,thespellinglistmaybe(seediscussionof,page20.44).Interlisp-10only:Ifnospellinglistwasprovided,butthewordbeginswitha``<'',triesdirectorynamecompletion(orlenamecompletionifthereisalreadyamatching``>''inthecurrentword).Iftypedinthemiddleofawordwillsupplyalternativecompletionsfromtheargumentto(ifany).(page20.43)mustbetruetoenablethisfeature.control-FSumex,Tops20only:Invokesforlenamecompletiononthecurrent``word''.control-YEscapestoaLispuserexec,fromwhichyoumayreturnbythecommand.However,wheninREADmodeandthebuerisnon-empty,control-YistreatedasLisp'sunquotemacroinstead,soyouhavetouseedit-control-Y(below)toinvoketheuserexec.inInterlisp-D,LFinInterlisp-10Retrievescharactersfromthepreviousnon-emptybuerwhenitisableto;e.g.,whentypedatthebeginningofthelinethiscommandrestoresthepreviouslineyoutypedatTTYIN;whentypedinthemiddleofalinellsintheremainingtextfromtheoldline;whentypedfollowing^Qor^Wrestoreswhatthosecommandserased.;Iftypedastherstcharacterofthelinemeansthelineisacomment;itisignored,andTTYINloopsbackformoreinput.control-XGoestotheendofyourinput(orendofexpressionifthereisanexcessrightparenthesis)andreturnsifparenthesesarebalanced,beepsifnot.CurrentlyimplementedinInterlisp-Donly.Duringmostkindsofinput,TTYINisin``autoll''mode:ifaspaceistypedneartherightmargin,acarriagereturnissimulatedtostartanewline.Infact,oncursor-addressabledisplays,linesarealwaysbroken,ifpossible,sothatnowordstraddlestheendoftheline.The``pseudo-carriagereturn''endingthelineisstillreadasaspace,however;i.e.,theprogramkeepstrackofwhetheralineendsinacarriagereturnorismerelybrokenatsomeconvenientpoint.Youwon'tgetcarriagereturnsinyourstringsunlessyouexplicitlytypethem.20.32ESCTTYINLISPXUSERWORDSTTYINCOMPLETEFLG?TTYIN?ACTIVATEFLGGTJFNOKSPLST|b'!&*K-x\:<2l !|$&b(-n/A 6t9;>BGZ<U"<W U<"J" $(,/-0926h8+ R %AQ><"DP!"r$),H-16j8>QN9 L<!$&'*027;O?CG)J<G<< U"%x(+0287=>?BDFFC< 6 #$&6+ 35\8;)>rED<&) 0/?X@4CwA< oZE#<%^'-0c26:D=C>RA)D?<! k# *,T0167>@BE>L<;G<-# $y'+ 22 9=0C9<y&*i.{1368]<?]6 <"'R)/ 688<:?_3 1<]=Y!A$(+r.x247??F+0K< 1$o&(-2%35m:/<@ E.<C!#(u*.057{+ 4b  &+)<4 "9'*w.26Q78;>@D~HF(U<""{(-0D58;@?@F+&<z 8!$^%(F.1U469K{ CE 2 "l$- *D.0,1i5/6:=@2CHc #_% !:$6')~,.2 :3?CE| q i&-(+\-"/25;2@gEP  >F"%'p,045;ACDq  $' & *#-038<>SAzE  ("}`m$ xG 9FCA!D1;G 9 6"1=h }@`m$,x;G?"}`m$INTERLISP-DDISPLAY-ORIENTEDTOOLS20.7.2MouseCommands[Interlisp-DOnly]ThemousebuttonsareinterpretedasfollowsduringTTYINinput:Movesthecarettowherethecursorispointing.Asyouholddown,thecaretmovesaroundwiththecursor;afteryouletup,anytypeinwillbeinsertedatthenewposition.Like,butmovesonlytowordboundaries.Deletestextfromthecarettothecursor,eitherforwardorbackward.Whileyouholddown,thetexttobedeletediscomplemented;whenyouletup,thetextactuallygoesaway.Ifyouletupoutsidethescopeofthetext,nothingiskilled(thisishowto``cancel''thecommand).Thisisroughlythesameas-withnoinitialselection(below).Ifyouholddownand/orwhilepressingthemousebuttons,youinsteadgetsecondaryselection,moveselectionordeleteselection.Youmakeaselectionbybugging(toselectacharacter)or(toselectaword),andoptionallyextendtheselectioneitherleftorrightusing.Whileyouaredoingthis,thecaretdoesnotmove,butyourselectedtextishighlightedinamannerindicatingwhatisabouttohappen.Whenyouhavemadeyourselection(allmousebuttonsupnow),liftuponand/orandtheactionyouhaveselectedwilloccur,whichis:Theselectedtextastypeinatthecaret.Thetextishighlightedwithabrokenunderlineduringselection.Deletetheselectedtext.Thetextiscomplementedduringselection.-Combinestheabove:deletetheselectedtextandinsertitatthecaret.Thisishowyoumovetextabout.Youcancancelaselectioninprogressbypressingorasiftoselect,andmovingoutsidetherangeofthetext.Themostrecenttextdeletedbymousecommandcanbeinsertedatthecaretbytyping(thesamekeythatretrievesthepreviousbuerwhenissuedattheendofaline).20.7.3DisplayEditingCommandsOnedit-keyterminals(Datamedia):InInterlisp-10,TTYINreadsfromtheterminalinbinarymode,allowingmanymoreeditingcommandsviatheeditkey,inthestyleofTVEDITcommands.NotethatduetoTenex'sunfortunatewayofhandlingtypeahead,itisnotpossibletotypeaheadeditcommandsbeforeTTYINhasstarted(i.e.,beforeitspromptappears),becausetheeditbitwillbethrownaway.Also,sinceESCAPEhasnumerousothermeaningsinLispandeveninTTYIN(forcompletion),ESCAPEisnotusedasasubstitutefortheeditkey.InInterlisp-D:Userswillprobablyhavelittleuseformostofthesecommands,ascursorpositioningcanoftenbedonemoreconveniently,andcertainlymoreobviously,withthemouse.Nevertheless,somecommands,suchasthecasechangingcommands,canbeuseful.Thekeycanbeusedasanedit(meta)keyinChorusandsubsequentreleasesifyouperform.Thiscallstoenablethemetakey,redenesthemiddleandtopblankkeys,andinformsTTYIN20.33LEFTLEFTMIDDLELEFTRIGHTRIGHTCTRLRIGHTCTRLSHIFTLEFTMIDDLERIGHTCTRLSHIFTSHIFTCTRLCTRLSHIFTLEFTMIDDLE(TTYINMETAT)(METASHIFTT)|b' #$+=3E\: i "JxW   Z f!%*7/5T<<y #!'g(/61a407y>?B(ES*<k"G$&)]+01249;=@P%< `!w#$& M <2l!E#%p*.375 ;@BFKzpMd"$A -14c6_8;(=BF I<YT $&)k,237;<?A GH/<!&#&,164N6R::?E*  t#t'O,/S39P<.ACwC u $'+E,V13<>BoC A +Hl %),D158&9=%DE@8  5!9%Q'+0;24a ;=L>xC >  \@j!5$(a+1f38P=W?~CkEG< &8 M#&E+m.2+659< ){ "7$(g+4-/D 6s9:?JEp8B< 5=<#\"1$&Q /3 27 H0<!!$)E,.2357;>@_CgF!.<+  U!#-4p6%79C=c@ E*A  I&'<  )P "C(+5-,2e46h9;@E[%  <w#'*.0}257G8o|!1 iYx  v+ " (4*/3719?_A9E' wL"}$'1),.1 4[6!<CG  r % ,-/i17=8<@,B ! g "'-R2Z47L9R;=BcFY6  f]L&'*-027:| B|Hs  _Dm 7  "< "%(d*-/33:j<@? GT  R "w(4+ 258h= FM? =B!(+-2n5Y:?YBDF    n!> (|-/1BCCF X`!$),%03w59=!?D("} P`m$@xT ;\P% iM Kz<H/(,E*C8A @< o9 5= 27  +)$. 7W @ *!} P|`m$VDisplayEditingCommandsthatyouwanttousethem.Alternatively,youcanusethe(bydefaulton)asdescribedinthenextparagraph.Onedit-keylessdisplayterminals(Heath):Ifyouwanttotypeanyofthesecommands,youneedtoprexthemwiththe``editprex''character.Setthevariabletothecharactercodeofthedesiredprexchar.Typetheeditprextwicetogivean``edit-ESCAPE''command.SomeusersoftheTENEXTVEDITprogramliketomakeESCAPE(33Q)betheeditprex,butthismakesitsomewhatawkwardtoeveruseescapecompletion.Onedit-keylesshardcopyterminals:Youprobablywanttoignorethissection,sinceyouwon'tbeabletoseewhat'sgoingonwhenyouissureeditcommands;thereisnoattemptmadetoechoanythingreasonable.Inthedescriptionsbelow,``currentword''meansthewordthecursorisunder,orifunderaspace,thepreviousword.Currentlyparenthesesaretreatedasspaces,whichisusuallywhatyouwant,butcanoccasionallycauseconfusionintheworddeletioncommands.Thenotation[]meansedit-,ifyouhaveaneditkey,orifyoudon't;$=escape.Mostcommandscanbeprecededbynumbersorescape(meansinnity),onlytherstofwhichrequirestheeditkey(ortheeditprex).Somecommandsalsoacceptnegativearguments,butsomeonlylookatthemagnitudeofthearg.MostofthesecommandsaretakenfromthedisplayeditorsTVEDITand/orE,andareconnedtoworkwithinonelineoftextunlessotherwisenoted.CursorMovementCommands:[delete],[bs],[<]Backupone(orn)characters.[space],[>]Moveforwardone(orn)characters.[^]Movesupone(orn)lines.[lf]Movesdownone(orn)lines.[(]Movebackone(orn)words.[)]Moveaheadone(orn)words.[tab]Movestoendofline;withanargumentmovestonthendofline;[$tab]goestoendofbuer.[control-L]Movestostartofline(ornthprevious,orstartofbuer).[{]and[}]Gotostartandendofbuer,respectively(like[$control-L]and[$tab]).[[](edit-left-bracket)Movestobeginningofthecurrentlist,wherecursoriscurrentlyunderanelementofthatlistoritsclosingparen.(Seealsotheauto-parenthesis-matchingfeaturebelowunder``Flags''.)[]](edit-right-bracket)Movestoendofcurrentlist.20.34EDITPREFIXCHAREDITPREFIXCHARCHARCHARCHAR|b'!&{+>x\:  E$ "%( *l8;I?ADZ  j W  9! #$'*,/237;>fA DVEU  > !$B&8H:\B9EGR \BP#) -/1n4>8; =BCwP df/ M  \ y#)z,.25:>?ADFLM  I#&.:135:>@D2J G  4 D$ (Z*.Y046w:<>B,CdGE } "$)B+/45:n=@DGTDW } 6#)K149=o>yBIB  h9o)+%-2+3{5{:>MEIGA j)}"2'*-'/15:=>?BDG?e %!F& -0457h:EG=  Og"s%(2,1`75;=@KBH0<  eOp%9 yb6 4j<[Y 1e /<$K0 , <b`)  X<oT& <$hM# <$# <B "(-.135w8behavesslightlydierentfromintvedit.Thesequence[I]behavesasinTVEDIT;itinsertsablanklineaheadofthecursor.typedanyothertimewhileininsertmodeactuallyinsertsa,behavingsomewhatlikeTVEDIT's[B].[$I]isthesameas[I].[cr]Whenthebuerisemptyisthesameas,i.e.restoresbuer'spreviouscontents.Otherwiseisjustlikea(exceptthatitalsoterminatesaninsert).Thus,[]willrepeatthepreviousinput(aswillwithouttheeditkey).[O]Does``Openline'',insertingacrlfafterthecursor,i.e.,itbreaksthelinebutleavesthecursorwhereitis.[T]Transposesthecharactersbeforeandafterthecursor.Whentypedattheendofaline,transposestheprevioustwocharacters.Refusestohandlefunnycases,suchastabs.[G]Grabsthecontentsofthepreviouslinefromthecursorpositiononward.[nG]grabsthenthpreviousline.[L]Lowercasescurrentword,ornwordsonline.[$L]lowercasestherestoftheline,orifgivenattheendoflinelowercasestheentireline.[U]Uppercasesanalogously.[C]Capitalize.Ifyougiveitanargument,onlytherstwordiscapitalized;therestarejustlowercased.[control-Q]Deletesthecurrentline.[$control-Q]deletesfromthecurrentcursorpositiontotheendofthebuer.Nootherargumentsarehandled.[control-W]Deletesthecurrentword,orthepreviouswordifsittingonaspace.[D]and[D]Arethesameas[control-W]and[control-Q],forapproximatecompatibilitywithTVEDIT.[J]``Justify''thisline.Thiswillbreakitifitistoolong,ormovewordsupfromthenextline20.35EMACSFLG|b' #$+=3Ex\: <! (*{0^1379mY5 <!'#b$=%'(V0 ! 4S* < K!n#&(N+> 2!359}:<@G?P%  < N<C]& ,.1E 8x<?BGFyL<oI <"(&(m)-H2-36!F < ' #&1(/ 6a8;>@\EE*<s 8"Q%.2x68;@AB GjC<BO#A%(.0Z1@<%O#)I,.36<AF\H0><(O! #')+037b9=@DjF=3<Ss!'-07H9!"%J(*/k23W7:<?GCSE27<Q/2 <  %K(=+.N38<=@CvEkF-< +!_ (I-e/37;Z>@5* <lS &"(,Z.38O=A;DG_(<% < Q >" #c'y),/ 68;=k?BDF,$7<1R "$a(J!1 <  , < fKf # )- /26;7 ?`ADG><  <i#W % &+~.1)5:?5@C)EG6<5!y#0 <"D !!$A)-P.245 5 <Mtz!$t)z+. 5 >7AO < Q"C&.')*,.237;>ADG)("}`m$xE*'X}`m$DisplayEditingCommandsiftooshort.Willnotjointoanemptyline,oronestartingwithatab(bothofwhichareinterpretedasparagraphbreaks).Anynewlinebreaksitintroducesareconsideredspaces,notcarriagereturns.[nJ]justiesnlines.Thelinelengthisdenedas,ignoringanypromptcharactersatthemargin.Ifisnegative,itisinterpretedasrelativetotherightmargin.isinitially8inInterlisp-D,72inInterlisp-10.[$F]``Finishes''theinput,regardlessofwherethecursoris.Specically,itgoestotheendoftheinputandentersa,control-Zor``]'',dependingonwhethernormal,orinputishappening.Notethata``]''won'tnecessarilyenda,butitseemslikelytoinmostcaseswhereyouwouldbeinclinedtousethiscommand,andmakesformorepredictablebehavior.MiscellaneousCommands:[P]Interlisp-D:Prettyprintbuer.Clearsthebuerandreprintsitusingprettyprint.Iftherearenotenoughrightparentheses,itwillsupplymore;iftherearetoomany,anyexcessremainsunprettyprintedattheendofthebuer.Mayrefusetodoanythingifthereisanunclosedstringorothererrortryingtoreadthebuer.[N]Refreshline.Sameascontrol-R.[$N]refreshesthewholebuer;[nN]refreshesnlines.CursormovementinTTYINdependsonTTYINbeingtheonlysourceofoutputtothescreen;ifyoudoacontrol-T,orasystemmessageappears,orlinenoiseoccurs,youmayneedtorefreshthelineforbestresults.InInterlisp-10,ifforsomereasonyourterminalfallsoutofbinarymode(e.g.canhappenwhenreturningtoaLisprunninginalowerfork),Edit-isunreadable,soyou'dhavetotypecontrol-Rinstead.[control-Y]Getsuserexec.Thus,thisislikeregularcontrol-Y,exceptwhendoingaREAD(whencontrol-Yisareadmacroandhencedoesnotinvokethisfunction).[$control-Y]Getsauserexec,butrstunreadsthecontentsofthebuerfromthecursoronward.ThusifyoutypedatTTYINsomethingdestinedfortheLispexecutive,youcando[control-L$control-Y]andgiveittoLisp.[_]Addsthecurrentwordtothespellinglist.Withzeroarg,removesword.See(page20.44).NotetoDatamedia,Heathusers:Inadditiontosimplecursormovementcommandsandinsert/delete,TTYINusesthedisplay'scursor-addressingcapabilitytooptimizecursormovementslongerthanafewcharacters,e.g.[tab]togototheendoftheline.Inordertobeabletoaddressthecursor,TTYINhastoknowwhereitistobeginwith.Lispkeepstrackofthecurrentprintpositionwithintheline,butdoesnotkeeptrackofthelineonthescreen(infact,itknowspreciouslittleaboutdisplays,muchlikeTenex).Thus,TTYINestablisheswhereitisbyforcingthecursortoappearonthelastlineofthescreen.Ordinarilythisisthecaseanyway(exceptpossiblyonstartup),butifthecursorhappenstobeonlyhalfwaydownthescreenatthetime,thereisapossiblyunsettlingleapofthecursorwhenTTYINstarts.20.36TTYJUSTLENGTHTTYJUSTLENGTHTTYJUSTLENGTHREPEATREADREADUSERWORDSTTYINCOMPLETEFLG|b'!&{+>x\:<L}!l#=%P),.169;*=AC]GZ< Gn$'*-^13 9; BGjX<c?"0#zU< >U+,14h91 ?{@C5H\TD"#% +-2E369FR<5 J"D$(% +=O <  #%),T02 :A;>@BEGM< U$}& '*139+DLM<  #$'4+ 249v:n=>xBFhH0J<!#(*,/658= ??B I<E B <  #f'*.!057Q: BwCGAQ< "$U'+/1'47$9=@D?<.X!("%r*Z-135;}<@BD&><m "%'; <Eu"Z$)'0,/&37:@fAEP9[<"$)-/27)8=9>A-EG)7<aL.X!'`,.15K: <?CyEE6<|! '()*-I05]8>7A9CE4j<\"(*W+.356:>iA_ Hs2< m@ "0%=)+l/ .<ej' #(,.26Q:;"?CHR,s< #&Z*-p )n '<ak45$>&|+-`/369=#BEG)&#<!y&)F+. 5C8:<A G$}<2!x <l #m(2377:]=ABGI2!  w<  &m(2,07>A '  > % +b-%27>rBFG? 0\"2$ &*&,/1368=@3D  M*_`.#&M*@-/2'7 :?DSF6  y6C "$(*./t39E<@nF    !%'(v*x//157~< >@|CEG  H53$6).h068:m M>gELM6!x+<!} P`m$&INTERLISP-DDISPLAY-ORIENTEDTOOLS20.7.4UsingTTYINforLispInputWhenTTYINisloaded,orasysoutcontainingTTYINisstartedup,thefunctioniscalled.Iftheterminalisadisplay,itsetstobe;iftheterminalisnon-display,willsetthevariablebackto.willalsosetitbackto.Therearetwoprincipaldierencesbetweenand:(1)parenthesisbalancing.Theinputdoesnotactivateonanexactlybalancingrightparen/bracketunlesstheinputstartedwithaparen/bracket,e.g.,``''willallbeononeline,terminatedby;and(2)readmacros.InInterlisp-10,TTYINdoesnotuseareadtable(TTYINbehavesasthoughusingthedefaultinitialLispterminalinputreadtable),soreadmacrosandredenitionofsyntaxcharactersarenotsupported;however,``'''()and``control-Y''()arebuiltin,andasimpleimplementationof?and?=issupplied.Also,thefacilitydescribedbelowcansupplysomeofthefunctionalityofimmediatereadmacrosintheeditor.InInterlisp-D,readmacrosare(mostly)supported.Immediatereadmacrostakeeectonlyiftypedattheendoftheinput(it'snotclearwhattheirsemanticsshouldbeelsewhere).20.7.5UsefulMacrosTherearetwousefuleditmacrosthatallowyoutouseTTYINasacharactereditor:(1)loadsthecurrentexpressionintothettyinbuertobeedited(thisisgoodforeditingcommentsandstrings).Inputisterminatedintheusualway(bytypingabalancingrightparenthesisattheendoftheinput,typingattheendofanalreadybalancedexpression,orcontrol-Xanywhereinsidethebalancedexpression).Typingcontrol-Eorclearingthebueraborts.(2)islikebutprettyprintstheexpressionintothebuer,andusesitsownwindow.Thevariablecontrolswhatprompt,ifany,uses;seepromptargumentdescriptioninnextsection(theinitialsettingisnoprompt).isnotyetimplementedinInterlisp-10.Themacroloadsthecurrentexpressionintothebuer,precededby,tobeusedasinputhoweverdesired;asatrivialexample,toevaluatethecurrentexpression,followedbyatoactivatethebuerwillperformroughlywhattheeditmacrodoes.Ofcourse,youcaneditthetosomethingelsetomakeitaneditcommand.isalsodenedattheexecutivelevelasaprogrammer'sassistantcommandthatloadsthebuerwiththetheindicatedevent,tobeeditedasdesired.isaprogrammer'sassistantcommandlikeEV[EDITV]thatperformsanonthevalueofthevariable.Andnally,iftheeventisconsidered``short''enough,theprogrammer'sassistantcommandwillloadthebuerwiththeevent'sinput,ratherthancallingtheeditor.IfyoureallywantedtheInterlispeditorforyourx,youcouldeithersay,ortypecontrol-U(orwhateverontops20)onceyougotTTYIN'sversiontoforceyouintotheeditor.20.37SETREADFNLISPXREADFNTTYINREADSETREADFNREAD(SETREADFN'READ)READTTYINREADREADUSE(FOO)FOR(FIE)QUOTEEVALTTYINREADMACROSEDEDEEEDTTYINEDITPROMPTEEEEBUFEBUFEVALEBUFVALUEOFTVEDFIXFIX-TTY:EVENT|b' #$+=3E\: i[N~xW g6  J &+-d14C6D(EV0  !Wi*!+568Y:@BDT R!&6F8;=?(BlGuQ   o @,235 < CnF6O  R1f"x% .q2t48?<?@ N9  q!M#;%*'.), 359B;>A4K4  E!H"%)U.4D6:>A.EI  e L'"V') 1X3'7 =@gB G { # &'*8-/2B3o7 AChDGkFC  Yq${)/)355:2=?A D  ay'1A  4?h(" *$14=8<?BDaHF?  Ic%"%+0i2X |; ix7) h(S)!%(V*,13y4:?UCG5  F]!#-% )*,4-037>!@F3  m o3ZG$)%i+/ 6N7:q==? AE27  kd!i (i*.0A6c:U<B[ 0 S2"R(+)-.36r =@J G.  c!$7M<@EmF-F  #%(-.038E9;CE&G+ 6 L(  r %9( *b.47v8M9;?@D^& @47#@%* 4:f@dE  &]`'+,.i1u679?AF^  G!v$K&("} 8`m$.xW<V0 4 .T #B'z 0DQ$/JN9 z=G#FCZ7)A0&}+B1.*-F A(6&1%P'@;  I :OABi&(q } 8`m$tx!"} `m$ProgrammingWithTTYIN20.7.6ProgrammingWithTTYIN[Function]TTYINprints,thenwaitsforinput.Thevaluereturnedinthenormalcaseisalistofallatomsontheline,withcommaandparensreturnedasindividualatoms;maybeusedtogetadierentkindofvalueback.isanatomorstring(anythingelseisconvertedtoastring).If,thevalueof,initially,willbeused.Ifis,nopromptwillbegiven.mayalsobeadottedpair,givingthepromptfortherstandsubsequent(oroverow)lines,eachpromptbeingastring/atomortodenoteabsenceofprompt.Notethatrebindinggivesaconvenientwaytoaectallthe``ordinary''promptsinsomeprogrammodule.isaspellinglist,i.e.,alistofatomsordottedpairs.Ifsupplied,itisusedtocheckandcorrectuserresponses,andtoprovidecompletioniftheusertypesESCAPE.IfisoneoftheLispsystemspellinglists(e.g.,or),wordsthatareescape-completedgetmovedtothefront,justasifahadfoundthem.Autocompletionisalsoperformedwhenusertypesabreakcharacter(cr,space,paren,etc),unlessoneofthe``noxspell''optionsbelowisselected;i.e.,ifthewordjusttypedwoulduniquelycompletebyESCAPE,TTYINbehavesasthoughESCAPEhadbeentyped.,ifnon-,determineswhathappenswhentheusertypes?orHELP.If=,programprintsbackinsuitableform.Ifisanyotheratom,orastringcontainingnospaces,itperforms.Anythingelseisprintedasis.Ifis,?andHELParetreatedasanyotheratomstheusertypes.[isauser-suppliedfunction,initiallyanoop;systemswithasuitableHASHpackage,forexample,havedenedittodisplayapieceoftextfromahashleassociatedwiththekey.]isanatomorlistofatomschosenfromamongthefollowing:UsesforHELPandEscapecompletion,butdoesnotattemptanying.Mainlyusefulifisincompleteandthecallerwantstohandlecorrectionsinamoreexiblewaythanastraight.Doesspellingcorrection,butrequiresconrmation.Requiresconrmationonspellingcorrection,butalsodoesautocompletionon(i.e.ifwhatuserhastypedsofaruniquelyidentiesamemberof,completesit).Thisallowsyoutohavethebenetsofautocompletionandstillallownewwordstobetyped.(onlyif=)InterpretsEscapetomeandirectorynamecompletion[Interlisp-10only].Like,butdoesusernamecompletion.ThisisidenticaltounderTenex[Interlisp-10only].(onlyif=)InterpretsEscapetomeanlenamecompletion,i.e.doesa[SumexandTops20only].Ifresponseisnoton,ordoesnotcorrectto,,interactswithuseruntilan20.38(TTYIN)NILDEFAULTPROMPT"**"T(.)NILDEFAULTPROMPT(.)USERWORDSSPELLINGS3FIXSPELLNILT(DISPLAYHELP)NILDISPLAYHELPHELPNOFIXSPELLFIXSPELLFIXSPELLMUSTAPPROVECRCOMPLETEDIRECTORYNILUSERDIRECTORYDIRECTORYFILENILGTJFNFIXPROMPTSPLSTHELPOPTIONSECHOTOFILETABSUNREADBUFRDTBLPROMPTOPTIONSPROMPTPROMPTPROMPTPROMPT1PROMPT2SPLSTSYNONYMROOTSPLSTHELPHELPSPLSTHELPHELPHELPOPTIONSSPLSTSPLSTSPLSTSPLSTSPLSTSPLST|b'!o )-g\: i axWC5 V0%&**-047y;8@BE%T}  "&o(^*-05^7  @f#&+ -/2 9>BD<<`   |$*,38'=m?.C:  7   _%),./A246c;@C[DS6 !z'(+x/E3T5H6: ACH4j  N&)Z*/14 9=>@LC&G2 M $\.01>4)9?DE1 4wM#%Y+F.356;<@BfE6H/x  Yq ,s<*gZ X$(J,/) )n ,"'*/ 8;>AG?'_" '+a13. :~=w@DH0&#) #$%).R1'4J5sA#, < '). a %W'J,I 35q8*;E DFr|!$:')+1G78=dBCwk!$&*,13 =@aC&F'\L"!%&j -2468^>B | rVw"P#%(. 6Z9_:@/ %'~C b$G%Q +0I25;c BEzH &^!N$( !B #%'l*-B178>KA~DG(}l`m$xW =O=VN9 @1L"* J-IH D-5X:AQ P* ?7MB4j ;2$ /xb)n '&#:X#  " "}w A ! & ! }l`m$~xWuw$ -.=1b9V0 "gRO  N9*,/D!ELL*!"L$<%L*)tD .i77BA7 <6z#,4j5,s )nu'-r?"l !4!} <`m$INTERLISP-DDISPLAY-ORIENTEDTOOLSacceptableresponseisentered.Ablankline(returning)isalwaysaccepted.Notethatifyouarewillingtoacceptresponsesthatarenoton,youprobablyshouldspecifyoneoftheoptions,or,lesttheuser'snewresponsegetedawaywithouttheirapproval.Lineisreadasastring,ratherthanlistofatoms.Goodforfreetext.Doesnotconvertlowercaseletterstouppercase.Foruseprincipallywiththearg(below).Doesnotcomputeavalue,butreturnsifusertypedanything,ifjustablankline.Formulti-lineinput.Repeatedlypromptsuntilusertypescontrol-Z(asinTenexsndmsg).Returnsonelonglist;withoptionreturnsasinglestringofeverythingtyped,withcarriagereturns(EOL)includedinthestring.Implies,,and.Additionally,inputmaybeterminatedwithcontrol-V,inwhichcasetheglobalagwillbesettrue(itissettoonanyothertermination).Thisagmaybeutilizedinanywaythecallerdesires.Onlytherstwordonthelineistreatedasbelongingto,theremainderofthelinebeingarbitrarytext;i.e.,``commandformat''.Ifotheroptionsaresupplied,stillappliestotherstwordtyped.Basically,italwaysreturns,whereiswhatevertheotheroptionsdictatefortheremainder.E.g.returnsor,dependingonwhethertherewasfurtherinput;returns.Whenusedwith,isonlyineectfortherstlinetyped;furthermore,iftherstlineconsistssolelyofacommand,theisignored,i.e.,theentireinputistakentobejustthecommand.Parens,brackets,andquotesaretreatedala,ratherthanbeingreturnedasindividualatoms.Controlcharactersmaybeinputviathecontrol-Vxnotation.Inputisterminatedroughlyalongthelinesofconventions:abalancingorover-balancingrightparen/bracketwillactivatetheinput,orwhennoparenthesisremainsunbalanced.overridesallotheroptions(except).Like,butimpliesthatTTYINshouldbehaveevenmorelike,i.e.,do,notbeerrorset-protected,etc.Interlisp-Donly:Thepromptargumentistreatedasusual,exceptthatTTYINassumesthatthepromptfortherstlinehasalreadybeenprintedbythecaller;thepromptfortherstlineisthususedonlywhenredisplayingtheline.ifspecied,user'sinputiscopiedtothisle,i.e.,TTYINcanbeusedasasimpletext-to-leroutineifisused.Ifisalist,copiestoalllesinthelist.isnotincludedonthele.isaspecialadditionfortabularinput.Itisalistoftabstops(numbers).Whenusertypesatab,TTYINautomaticallyspacesovertothenexttabstop(thusthersttabstopisactuallythesecond``column''ofinput).Alsotreatsspeciallythecharacters*and``;theyechonormally,andthenautomaticallytab20.39NILNOXFISPELLMUSTAPPROVECRCOMPLETEFIXSPELLSTRINGNORAISENOVALUETNILREPEATSTRINGTEXTREPEATNORAISENOVALUECTRLVFLGNILCOMMANDCOMMAND(.)COMMANDNOVALUE()(.T)COMMANDSTRING(."")REPEATCOMMANDREPEATREADREADREADREADNORAISELISPXREADREADREADNORAISENOPROMPTNOVALUESPLSTECHOTOFILESPLSTCMDREST-OF-INPUTREST-OF-INPUTCMDCMDCMDREST-OF-INPUTECHOTOFILEECHOTOFILEPROMPTTABS|b' #$+=3Ex\: h$ %+_-03 <=?kCZ!#(()-368;@AwDX #7$'04c>IWI$ S#>(137FQ>,"&J)6-K.2N9L #&1T39*<?DEL% .!$(X1d25c6:^I\ % ,D15 8;@PACEG#l&?),s5m9>@D*H&FC d"%*/|39s;=|C=!(5)12V :> AB An!T# '$*,0:=^?ZADpFKG?ah! $ - 0'257<>T@CF,>L;Gw :#%((*,K028>T?2AH&9 A%(+m2c89q<AC7& %'a),0Q4 ;<A6V#$24R:F<@xEo4 $h5<?DI3 q %)i,0A1e%@&z*-6=>B"CG/}# +-6/2W5 : =?@G.5#&(,0{157O9=;>:+x"=$)j+0k167y;>BH0)n M#N( /2F4_81:=AD'N $t)-0N39 BJC&##'H 039';@BF+$} !^& 39<?E"6!&g)9.=27q:>QD\E>G,d "' .(' "%*127u9K=sAD"I'?)+.148C?EG0 <I%&W'm)./1}4@58$@AD<  N  HU!j%'c(*!,s.@3 ; ?6BCEG(  4.!$)-/B167<?C :  V &K'*c,3/X28;> G(}`m$,x\::NX+ 51 @ WI+%TD Q> N9 L.[I G/C= |"T+A3_?V;G 7E6V"4(.:"=A>EGS3 5;sE1eT#17.+ 36'5$}/z" A,' 0"}`m$xZ=N9( ;G:7F6VT(,T.g4:B3 F1e, 0 :< "} h`m$JEEInterfaceover.allowsthecallerto''preload``theTTYINbuerwithalineofinput.isalist,theelementsofwhichareunreadintothebuer(i.e.,''theouterparenthesesarestrippedo``)tobeeditedfurtherasdesired;asimple(orcontrol-Zforinput)willthuscausethebuer'scontentstobereturnedunchanged.Ifdoinginput,the''names``oftheinputlistareused,i.e.,quotesand%'swillappearasneeded;otherwisethebuerwilllookasthoughhadbeen'ed.istreatedsomewhatlike,sothatifitcontainsapseudo-carriagereturn(thevalueof),theinputlineterminatesthere.Inputcanalsobeunreadfromale,usingtheformat:=,whereandarelebytepointers.ThismakesTTYINaminiaturetextleeditor.[Interlisp-Donly]isthereadtabletouseforingtheinputwhenoneoftheoptionsisgiven.AlotofcharacterinterpretationsarehardwiredintoTTYIN,socurrentlytheonlyeectthishasisintheactual,andindecidingwhetheracharactertypedattheendoftheinputisanimmediatereadmacro,forpurposesoftermination.Iftheglobalvariableis,oroptionisgiven,TTYINpermitstype-ahead;otherwiseitclearsthebuerbeforepromptingtheuser.20.7.7EEInterfaceThefollowingmaybeusefulasawayofoutsiderstocallTTYINasaneditor.ThesefunctionsarecurrentlyonlyinInterlisp-D.[Function]Thisisthebodyof.Switchesthettyto,clearsit,prettyprints,alistofexpressions,intoit,andleavesyouinTTYINtoedititasLispinput.Returnsanewlistofexpressions.Ifisnon-,itisafunctionoftwoarguments,and,whichiscalledinsteadoftoprinttheexpressionstothewindow(actuallyascratchle).Notethatisalist,sonormallytheouterparenthesesshouldnotbeprinted.=Tisshorthandfor``unpretty'';useinsteadof.[Variable]Ifistrue,closesthewindowonexit.[Variable]Iftheargtois,itusesthevalueof,creatingitifitdoesnotyetexist.[Variable]Thedefaultvalueforin'scallto.[Function]Calledundera.Switchesthettyto(defaultedasin)andclearsit.Thewindow'spositionisleftsothatTTYINwillbe20.40REPEATREADPRIN2PRIN1READBUFHISTSTR0HISTSTR1(HISTSTR1(.))READREADREADTYPEAHEADFLGTLISPXREAD(TTYINEDIT)EENILPRETTYPRINTPRIN2PRETTYPRINTTTYINAUTOCLOSEFLGTTYINAUTOCLOSEFLGTTYINEDITTTYINEDITWINDOWTTYINEDITNILTTYINEDITWINDOWTTYINPRINTFNEETTYINEDIT(SET.TTYINEDIT.WINDOW)RESETLSTTTYINEDITUNREADBUFUNREADBUFUNREADBUFUNREADBUFUNREADBUFFILESTARTENDSTARTENDRDTBLEXPRSWINDOWPRINTFNWINDOWEXPRSPRINTFNEXPRSFILEEXPRSPRINTFNWINDOWPRINTFNWINDOWWINDOW|b'%((x\8 Y3m %!',14F58r:QG"HW  :!$'X+.15 =?jDH0U  !~$&+w,48;>BDTA V !)H-H/59;>ACFLR  qiZk#),0257DCFP>%#-.o0$2455}:;@EOP  h- 2" )LK 2T $(2r@J!"z*0r247=@DH OVE Zf /#%1'-,/15v9 ;=rCHsDU 9"% +.{35;=ADGjB  R U6!e&'-135l89<*?A4CA  : >  m !#$&34k8t=sBcEe<^ e7&)|7 ix3  !Lez"$*,y/,4S6*8B=AAiG1  .C5 -D'!%c&=+.;0J7P8+;= I+U2 $'),035z: Ee"/4'L*,+254 < CaH& \ WC ')^48:@BC  #',0f12L57T:Ia. $&([C | "+.c/2K; C5 !)h*036b> FH0 e6 G#&)+27a8;g=>@E1G(}`m$xU/6TA%f0VP 'OP LK*BJ E)?BP> # *. #-D#&#A%N#0 "> \ W ', $-R;PLK8*CEmH`J} rw&~')-xE .*-7-D16%E & ;'BE#&"!9g% h 8<"}`m$pINTERLISP-DDISPLAY-ORIENTEDTOOLShappywithitifyounowcallTTYINyourself.Specically,thismeanspositioninganintegralnumberoflinesfromthebottomofthewindow,thewaythetop-levelttywindownormallyis.[Function]Returns,possiblycreating,thescratchlethatTTYINusesforprettyprintingitsinput.Thelepointerissettozero.SinceTTYINdoesusethisle,bewareofmultiplesimultaneoususeofthele.20.7.8?=HandlerInInterlisp,the?=readmacrodisplaystheargumentstothefunctioncurrently``inprogress''inthetypein.SinceTTYINwantsyoutobeabletocontinueeditingthebueraftera?=,itprocessesthismacrospeciallyonitsown,printingtheargumentsbelowyourtypeinandthenputtingthecursorbackwhereitwaswhen?=wastyped.Foruserswhowantspecialtreatmentof?=,thefollowinghookexists:[Variable]Thevalueofthisvariable,ifnon-,isauserfunctionofoneargumentthatiscalledwhen?=istyped.Theargumentisthefunctionthat?=thinksitisinsideof.Theuserfunctionshouldreturnoneofthefollowing:Normal?=processingisperformed.Nothingisdone.Presumablytheuserfunctionhasdonesomethingprivately,perhapsdiddledsomeotherwindow,orcalled(below).alistTreatsastheargumentlistofthefunctioninquestion,andperformsthenormal?=processingusingit.anythingelseThevalueisprintedinlieuofwhat?=normallyprints.Atthetimethat?=istyped,nothinghasbeen``read''yet,soyoudon'thavethenormalcontextyoumightexpectinsideaconventionalreadmacro.Iftheuserfunctionwantstoexaminethetyped-inargumentsbeingpassedtothefn,however,itcanperform,whichbundlesupeverythingbetweenthefunctionandthetypingof?=intoalist,whichitreturns(thusitparallelsanarglist;if?=wastypedimmediatelyafterthefunctionname).[Function]Doesthefunction/argumentprintingfor?=.isanargumentlist,isalistofactualparameters(fromthetypein)tomatchupwithargs.isavalueofthefunction;itdefaultsto.20.7.9ReadMacrosWhendoinginputinInterlisp-10,noLisp-stylereadmacrosareavailable(butthe'andcontrol-Ymacrosarebuiltin).Principallybecauseoftheusefulnessoftheeditorreadmacros(setby20.41(TTYIN.SCRATCHFILE)TTYIN?=FNNILNILTTTYIN.PRINTARGS(ARGS.)(TTYIN.READ?=ARGS)NIL(TTYIN.PRINTARGS)ARGTYPE(ARGTYPE)READSTUFFSTUFFFNARGSACTUALSARGTYPEARGSACTUALSARGTYPEFN|b' #$+=3Ex\: 0!$;'7).4q ;>B Z#%f(+.Y347,<?AD2FX$UC5 TD`"(+ 149<?& HR!T&+')+/O38#;c=@CZH&P %Y')+|L ixH/  U$r#&G-.1c6<?u EGF  Y"a%p'6,148D;<?A-G>D $  k")-05.7;"?BaFC=  8vt!`$'+ /r57<97"(:)./1D2w5x:<?mEHs<M!#+'*Z014I9<>CDtE;G%")-0n2%4 8B!$ *,0 5="\$) 0369<?yC@FL3 "w$f's,N/3!5G8}:1.-F$&~(.02}4:;AoD+#& ,0m(Q&m#$~)N*-/f252:#   dy n"&*],.1$47:>CQE"J Nc  #P$'\*i/35;6=ArC5  ,Nw\"Q67;AC  `I q "$')+/1(59i:@<B6Y  K g:  C!'TC5 .)W.079:A& -b" ),/2359;>Hscu- +,.23Z?| ix e #%3(@+~.3e5;>AAD + "#'),j 3M5a8,c8B5=3=.  % 'FT +Dc%5>F  }pt`m$Bx.!-F T4|%f'35CDBCc<!}4`m$6ReadMacros),andthedesireforawayofchangingthemeaningsofthedisplayeditingcommands,thefollowingexistsasahack:[Variable]Valueisasetofshorthandinputsuseableduringinput.Itisanalistofentries.Iftheusertypestheindicatedcharacter(editbitisdenotedbythe200Qbitincharcode),TTYINbehavesasthoughthesynonymcharacterhadbeentyped.Specialcases:0-thecharacterisignored;200Q-pureEditbit;meanstoreadanothercharandturnonitseditbit;400Q-macroquote:readanothercharanduseitsoriginalmeaning.Forexample,ifyouhavemacros((33Q.200Q)(30Q.33Q)),thenEscape(33Q)willbehaveasaneditprex,andcontrol-X(30Q)willbehavelikeEscape.Note:currently,synonymsforeditcommandsarenotwell-supported,workingonlywhenthecommandistypedwithnoargument.Slightlymorepowerfulmacrosalsocanbesupplied;theyarerecognizedwhenacharacteristypedonanemptyline,i.e.,astherstthingaftertheprompt.Inthiscase,theentryisoftheformor,whereisalistthatevaluatestrue.Ifisalist,itised;otherwiseitisleftunevaluated.Theresultofthisevaluation(oritself)istreatedasfollows:Themacroisignoredandthecharacterreadsnormally,i.e.,asthoughhadneverexisted.AnintegerAcharactercode,treatedasabove.Specialcase:-1istreatedlike0,butsaysthatthedisplaymayhavebeenalteredintheevaluationofthemacro,soTTYINshouldresetitselfappropriately.AnythingelseThisTTYINinputisterminated(withacrlf)andreturnsthevalueof``response''(turnedintoalistifnecessary).Thisistheprincipaluseofthisfacility.Themacrocharacterthusstandsforthe(possiblycomputed)reponse,terminatedifnecessarywithacrlf.Theoriginalcharacterisnotechoed.Interruptcharacters,ofcourse,cannotbereadmacros,asTTYINneverseesthem,butanyothercharacters,evennon-controlchars,areallowed.Theabilitytoreturnallowsyoutohaveconditionalmacrosthatonlyapplyinspeciedsituations(e.g.,themacromightcheckthepromptorothercontextualvariables).Tousethisspecicallytodoimmediateeditorreadmacros,dothefollowingforeacheditcommandandcharacteryouwanttoinvokeitwith:Forexample,willmakelinefeeddothecommand.Notethatthiswillonlyactivatelinefeedatthebeginningofaline,notanywhereintheline.Therewillprobablybeauserfunctiontodothisinthenextrelease.Notethatputtingonwouldalsohavetheeectofreturningfromthecallsothattheeditorwoulddoan.However,TTYINwouldalsoreturn20.42SETTERMCHARSTTYINREADMACROSREAD(.)TTYINREADMACROS(T.)(.)EVALNILTTYINREADMACROSNIL(LISPXID)(ADDTOVARTTYINREADMACROS('CHARMACRO?)))(ADDTOVARTTYINREADMACROS(12QCHARMACRO?!NX))!NX(12QT.!NX)TTYINREADMACROS"!NX"READ!NX!NXCHARCODESYNONYMCHARCODERESPONSECHARCODECONDITIONRESPONSECONDITIONRESPONSERESPONSECHARCODEEDITCOM|b1%)$x\:c# "$&,.569J>BZ  IVWC UO ")R-2;E?A|C E H&TD-!.'/148:@FR !$,')+9 16;=:ADP ?#M{ !"%v+t,26`7w:=@DFLM"y%~')b,%.2h3h7;?DG(J4)!I'*w0e148<@B4FnI, %),1n3E5]8H<?D?EG\tG"'+ 2/8; =DGjE !P&)-j/6#7;`>x@|B &+d.Y1 3(9m<?" F+A  $&) -p035f7:>BD?e R0i4F58:=w:q;oG.H<"&/x12T56;z>DbEGj:t "&&'*8 09<=d>C"D7o#%*-0@6T:!@CPE.5),k02211$#',y.427;-;<>aC EG^/xg""$n) +/.2w68: AhCE[-Z#X'+.l *)(% (*{ 15U68:<ADPH&' #(+- /i0 8`;=)?EH&%>$Y'6+g1R4\8:=5B$7" )*|0348:@EGj"  232"%+(-/5*9: AC U!k%_)+{/06;?B( }`m$x\: W U7?TD$,J?e">_FH=!U19<87o53@? S(9 7?(,K 5D  h#_ G-`F }`m$txTD N&2?e?6B=",%)3??<(u:t2 $2N} \``m$6INTERLISP-DDISPLAY-ORIENTEDTOOLSoutsidetheeditor(probablyresultinginau.b.a.error,orconvincingDWIMtoentertheeditor),andalsotheclearingoftheoutputbuer(performedby?)wouldnothappen.20.7.10AssortedFlagsTheseagscontrolaspectsofTTYIN'sbehavior.Somehavealreadybeenmentioned.Theirinitialvaluesareall.InInterlisp-D,theagsareallinitially.[Variable]Iftrue,TTYINalwayspermitstypeahead;otherwiseitclearsthebuerforanybutinput.[Variable]Iftrue,enablesthefeaturewhereby?listsalternativecompletionsfromthecurrentspellinglist.[Variable]Aectsdisplayediting.Whentrue,TTYINtriestobehavealittlemorelikeEMACS(inverysimpleways)thanTVEDIT.Specically,ithasthefollowingeectscurrently:(1)allnon-editcharactersself-insert(i.e.behaveasifyou'realwaysinInsertmode);(2)[D]istheEMACSdeletetoendofwordcommand.[Variable]Iftrue,thenwheneveryouaretypingLispinputandtypearightparenthesis/bracket,TTYINwillbrieymovethecursortothematchingparenthesis/bracket,assumingitisstillonthescreen.Thecursorstaysthereforabout1second,oruntilyoutypeanothercharacter(i.e.,ifyoutypefastyou'llnevernoticeit).ThisfeaturewasinspiredbyasimilarEMACSfeature,andturnedouttobeprettyeasytoimplement.[Variable]CausesTTYINtoalwaysphysicallybackspace,evenifyou'rerunningonanon-display(notaDMorHeath),ratherthanprint\deletedtext\(thisassumesyourhardcopyterminalorglassttyiscapableofbackspacing).IfTTYINBSFLGisLF,theninadditiontobackspacing,TTYINx'soutthedeletedcharactersasitbacksup,andwhenyoustopdeleting,itoutputsalinefeedtodroptoanew,cleanlinebeforeresuming.Tosavepaper,thislinefeedoperationisnotdonewhenonlyasinglecharacterisdeleted,onthegroundsthatyoucanprobablygureoutwhatyoutypedanyway.[Variable]Analistofspecialresponsesthatwillbehandledbyroutinesdesignatedbytheprogrammer.See``SpecialResponses'',below.[Variable][Interlisp-Donly]Iftrue,non-inputsareerrorset-protected(control-Etrapsbacktotheprompt),otherwiseerrorspropagateupwards.Initially.[Variable][Tenexonly]Whentrue,performsmailchecking,etc.beforemostinputs(exceptEVALQTinputs,whereitisassumedthishasalreadybeendone,orinputsindented20.43CHARMACRONILTTYPEAHEADFLGLISPXREAD?ACTIVATEFLGEMACSFLGSHOWPARENFLGTTYINBSFLGTTYINRESPONSESTTYINERRORSETFLGLISPXREADNILTTYINMAILFLG|b' #$+=3Ex\: @W!o#4$v(,.i 5l:_<%?B:G(Z  :N (137G9|V0 i xQ  +!'+.36 >)AEP%  =Z  ="$|*NM C KzG!&F+V 28:@>2@DG?I"9FC E*>!#\'-d.1I 7 ?|BEC@C >!n'M+/-4k79>?CcG4=3c"'+.5L =>A@C; "%'1), 3x59=]B;DE9!&_(*,V.4=8F9<>_A6C 5="5% ')+-014369:=34#s'#)t+X-/215 7pCEG1Xx!&)+.515A7;<ACEUG)0K#%)&*-v03S7B;'?ZBE9F.x" #\(-/y25:W<>@EH0-)C (UR!d#%' . 48B9=CEE]F&ot #%*.25 >ACF% #$( *+w0l2 :<6 EG4#d!# +025S7< CDF! {#2&++-2 388w:&=w?&@QCG) "$',..4':Y;>RAEHr!#(8*I,247:6@DF[.C "#),/169>| EfG| "( /wC  r "{#'#168V=QCVHs+ O"Y(.32&8>F$ &C >#'+-006M9%=|@E "<&/'d(.027:>z@D&(}`m$xZ*P%+)wM I%F @ 6 )  w )+C & !}`m$>SpecialResponsesbymorethanafewspaces).Thepackagemustbeloadedforthis.[Variable]Iftrue,enablesEscapecompletionfromduringREADinputs.Detailsbelow.(page15.15)containswordsyoumentionedrecently:functionsyouhavedenedoredited,variablesyouhavesetorevaluatedattheexecutivelevel,etc.Thishappenstobeaveryconvenientlistforcontext-freeescapecompletion;ifyouhaverecentlyeditedafunction,chancesaregoodyoumaywanttoedititagain(typing``EFxx$'')ortypeacalltoit.Ifthereisnocompletionforthecurrentwordfrom,theescapeechoesas``$'',i.e.nothingspecialhappens;ifthereismorethanonepossiblecompletion,yougetbeeped.Iftypedwhennotinsideaword,Escapecompletestothevalueof,i.e.,thelastthingyoutypedthatthep.a.``noticed''(settingto0disablesthislatterfeature),exceptthatEscapeatthebeginningofthelineisleftalone(itisap.a.command).Ifyoureallywantedtoenteranescape,youcan,ofcourse,justquoteitwithacontrol-V,likeyoucanothercontrolchars.Youmayexplicitlyaddwordstoyourselfthatwouldn'tgetthereotherwise.Tomakethisconvenientonlinetheeditcommand[_]means``addthecurrentatomto''(youmightthinkofthecommandas``pointingoutthisatom'').Forexample,youmightbeenteringafunctiondenitionandwantto``pointto''oneormoreofitsargumentsorprogvariables.Givinganargumentofzerotothiscommandwillinsteadremovetheindicatedatomfrom.Notethatthisfeaturelosessomeofitsvalueifthespellinglististoolong,forthenthecompletiontakestoolongcomputationallyand,moreimportant,therearetoomanyalternativecompletionsforyoutogetbywithtypingafewcharactersfollowedbyescape.Lisp'smaintenanceofthespellinglistkeepsthe``temporary''section(whichiswhereeverythinggoesinitiallyunlessyousayotherwise)limitedtoatoms,initially100.Wordsfallotheendiftheyhaven'tbeenused(theyare``used''ifcorrectstoone,oryouusetocompleteone).20.7.11SpecialResponsesThereisafacilityforhandling``specialresponses''duringanynon-TTYINinput.ThisactionisindependentoftheparticularcalltoTTYIN,andexiststoallowyoutoeectively``advise''TTYINtointerceptcertaincommands.Afterthecommandisprocessed,controlreturnstotheoriginalTTYINcall.Thefacilityisimplementedviathelist.[Variable]isalistofelements,eachoftheform:isasingleatomorlistofcommandstoberecognized;ised(ifalist),ored(ifanatom)tothecommandandtherestoftheline.Withinthisformonecanreferencethefreevariables(thecommandtheusertyped)and(therestoftheline).Ifistheatom,thismeanstopasstherestoflineasalist;ifitis,thismeanstopassitasastring;otherwise,thecommandisonlyvalidifthereisnothingelseontheline.Ifreturnstheatom,itisnottreatedasa20.44MAILWATCHTTYINCOMPLETEFLGUSERWORDSUSERWORDSUSERWORDSLASTWORDTTYINCOMPLETEFLGUSERWORDSUSERWORDSUSERWORDSUSERWORDS#USERWORDSFIXSPELLREADTTYINRESPONSESTTYINRESPONSESTTYINRESPONSES()EVALAPPLYCOMMANDLINELINESTRINGIGNORECOMMANDSRESPONSE-FORMOPTIONCOMMANDSRESPONSE-FORMOPTIONRESPONSE-FORM|b'$0(x\:0 S!{$)K449r<>C=ExY5C W 1 %z ,7<@E:URF#U&,28;[>CEZQ> b!\#)-k013N8:q@wDFM  d/F>#$(%)l,-015W69 @BBELM   % &),16\   &+.46: ANCG><` \ h"&*H,1[4>?/BUFA:  f >!W&)5/157= >5C9  (H "z$`+,0* 6;0=,C]E"H07o  ="!'m*54j  [$_6!%b&).%0]14(79<?E Fc2  Pdnx  &*9,.2 9` AC;EG1  Y2 #J%M*B.> 6D8:k?/x   !("& -^0s5k9<:> E/- !.%(*8,/]038<?ZBEE,- GH  #1(*0w|' i8x#d \{" ).(07<ADGHs! - t &D),.2Y5$6 ={ CH0  {!i')$ /4\9:=BFr  D 3-mC #%X&(*t035g7b "B&Q)+.=07 8;  ~"g$:%\(d.T0=2379;B8DG>qoH#&*",/v57:G k#h'.\18357;BCFc &"$'*,.1B24268h9@MA6CH0 &0# *>,3+47;_<@yAG) /,"03U;<>D?BHFH(} `m$x\:,!Y5 W/R LM IY;><`6s7o.K1A- ,- K#d3r! m  0O"* q@*u &;B 6!} `m$bx} e'$'+Be=I !4'( } |D`m$0INTERLISP-DDISPLAY-ORIENTEDTOOLSspecialresponse(i.e.theinputisreturnednormallyastheresultofTTYIN).InMYCIN,thecommandishandledthisway;anytimetheusertypesastherstwordofinput,TTYINpassestherestofthelinetoamycin-denedfunctionwhichpromptsforthetextofthecomment(recursivelyusingTTYINwiththeoption).Whencontrolreturns,TTYINgoesbackandpromptsfortheoriginalinputagain.Theentryforthisis;isaMYCINfunctionofoneargument(theone-linecomment,orforextendedcomments).Suggesteduse:globalcommandsoroptionscanbeaddedtothetoplevelvalueof.Formorespecializedcommands,rebindtoinsideanymodulewhereyouwanttodothissortofspecialprocessing.Specialresponsesarenotcheckedforduring-styleinput.20.7.12DisplayTypes[ThisisnotrelevantinInterlisp-D]TTYINdeterminesthetypeofdisplaybycalling,whichisinitiallydenedtotestthevalueofthejsys.Itreturnseither(forprintingterminals)orasmallnumbergivingTTYIN'sinternalcodefortheterminaltype.ThetypesTTYINcurrentlyknowsabout:0=glasstty(capableofdeletingcharsbybackspacing,butlittleelse);1=Datamedia;2=Heath.OnlytheDatamediahasfulleditingpower.hasbuiltintoitthecorrectterminaltypesforSumexandStanfordcampus20's:Datamedia=11ontenex,5ontops20;Heath=18onTenex,25ontops20.Youcanoverridethosevaluesbysettingthevariabletobeanalistassociatingthevaluewithoneoftheseinternalcodes.Forexample,Sumexdisplayscorrespondto=[althoughthisisactuallycompiledintoforspeed].AnydisplayterminalotherthanDatamediaandHeathcanprobablysafelybeassignedto``0''forglasstty.Toaddnewterminaltypes,youhavetochooseanumberforit,addnewcodetoTTYINforitandrecompile.TheTTYINcodespecieswhatthecapabilitiesoftheterminalare,andhowtodotheprimitiveoperations:up,down,left,right,addresscursor,erasescreen,erasetoendofline,insertcharacter,etc.ForterminalslackinganEditkey(currentlyonlyDatamediashaveit),setthevariabletotheasciicodeofanEdit``prex''(i.e.anythingtypedprecededbytheprexisconsideredtohavetheeditbiton).Ifyouris33Q(Escape),youcantypearealEscapebytyping3ofthem(2won'tdo,sincethatmeans``Edit-Escape'',alegitimateargumenttoanothercommand).YoucouldalsodeneanEscapesynonymwithifyouwanted(butcurrentlyitdoesn'tworkinlenamecompletion).Settingforaterminalthatisnotequippedtohandlethefullrangeofeditingfunctions(onlytheHeathandDatamediaarecurrentlysoequipped)isnotguaranteedtowork,i.e.thedisplaywillnotalwaysbeuptodate;butifyoucankeeptrackofwhatyou'redoing,togetherwithanoccasionalcontrol-Rtohelpout,gorightahead.20.45COMMENTCOMMENTTEXTTTYINRESPONSES(COMMENT(GRIPELINE)LIST)GRIPENILTTYINRESPONSESTTYINRESPONSES(APPENDTTYINRESPONSES)READDISPLAYTERMPGTTYPNILDISPLAYTERMPDISPLAYTYPESGTTYPDISPLAYTYPES((11.1)(18.2))DISPLAYTERMPEDITPREFIXCHAREDITPREFIXCHARTTYINREADMACROSEDITPREFIXCHARNEWENTRIES|b' #$+=3Ex\:!$&*, 17k9;u?<@Y5   "Z'*W-0]358BDGW  s"O$+&)+Y,05;a?EGU  & "Z's*16:?DTD  A[!%)8A8R  !@&,,-069s<>EP  ' M C!&$R&(,.-0p59FsG4LM  W ++J  L!S#X%(*c. G !()T,|C= iYx>  fC- ;   v["$#2379)>4C*DG:.  2/LY&4(. 4s6)7F:?D8 A|M"&D+A15X5  FV"P$J ,H.12~  /x ,s  b? p/2P58y9<;@FL*  9Q_!(*,.24(6>;(?[APCEE[)(  78#'a). 0@BDF' 7> "}%*/717< A+ H0%'-&/1E6aV@<EGJ"  'j  1!#(b).1O3%599CWEG( tQu #&* - .06H8;l>M?AC@  t^"'l*/s247N9<? F;  aH $' .24,618y   - "(,T214$6|:^; BDBG  ,"#&,/r1468=S?EC}DFWJ   &Z' . 4N6;<BF  A-8.1>58>@ DH0  (+ ,?146 8>@]DGTX  ,2 :$i',./06s8C>@QB   s,^"$&(,#.025l8<@>AhE JbQ {!"%(*-(!} P`m$JxY5<U-TD, BR FM: LMi -<G%~;( :.#6,s%4 )(6 '% }_"@#?D ;= \  !q !} P`m$jxLM3 !} X `m$DisplayTypes20.46|b'%m*\x("}`m$ TIMESROMANGACHACMS  TIMESROMAN  TIMESROMAN CMSYN l p ,$+ h4 dA J U ` i r p{ d N 2  n  & 6& 0|8j@ NJ PT _ j <s{ x   j// ChapDT.PRESSSANNELLASEPTEMBER 15, 1983 12:29:15