!* -*- Teco -*- Library created and maintained by KMP@MC ! !~Filename~:! !Pseduo Tags Hack for people who don't like tags tables! MINI !& Setup MINI Library:! !& Set things up for our neat library! m.m^R_Mini-Find_Tagu.., !* Put Mini-Find on M-, ! m.m^R_Mini-Visit_Tagu..., !* Put Mini-Visit on C-M-, ! m.m^R_Mini-Arglistu.a !* Put Mini-Arglist on c-sh-A ! m.m^R_Mini-Docu.d !* Put Mini-Doc on c-sh-D !  !& Kill MINI Library:! !& Kill our library ! !* Zeroing them is better than leaving them set ! 1,m.m^R_Mini-Find_Tag - q.., "e 0u.., ' 1,m.m^R_Mini-Visit_Tag - q...,"e 0u...,' 1,m.m^R_Mini-Arglist - q.a "e 0u.a ' 1,m.m^R_Mini-Doc - q.d "e 0u.d '  !^R Mini-Visit Tag:! !^R Get recursive edit on tag in current buffer.! 1,(f):m(m.m^R_Mini-Find_Tag) !^R Mini-Find Tag:! !^R Search for tag in current buffer. Defaults are kept per-mode. The following modes are permitted: Lisp, Scheme, Teco, Midas, Schlap ! [0[1[2[3[4[5[6[7[8[9[B !* Bind qregs needed ! qModeu0 !* Get mode in q0 ! :i*fo..QLast_0_Mini-Tagu1 !* Get default in q1 ! 1:< o0 > !* Try to find tag to use ! !* If we get here, we lost ! :i*USM Unsupported_Mode:_0 fserr !* Note: If q3 does not contain a linefeed, repeated calls to ! !* C-U M-, and C-U C-M-, will lose by finding same tag ! !* repeatedly unless user types C-N on his own ! !Schlap! !Midas! > :i3  !* Search from head of line ! :i4 :  !* Require a : on line ! oDo-It !* ! !Teco! > :i3  î !  !* q3: leading text ! :i4 :!  !* q4: trailing text ! oDo-It !* Go do the search ! !Scheme! !Lisp! > :i3 (DEF (SET !* q3: leading text ! :i4  !* q4: trailing text ! oDo-It !* Go do the search ! !* -- The search itself -- *! !Do-It! !* Come here to search ! qBuffer_NameuB !* Remember this buffer ! .u7 .u9 !* Remember starting point ! fn qBm(m.mSelect_Buffer) q7j  !* Come back here when done ! ff&1"n !* If explicit arg, ! q1u2 !* Use default string ! :i*No_more_such_tagsu8 !* Set up error message ! oArg-Given' !* Skip prompt ! "# j !* Else, jump to buffer top ! :i*No_such_tagu8' !* and set up other errmsg ! ff&2"e 1,f Find_0_Def_(1):_u2' !* Prompt for tag ! "# 1,f Visit_0_Def_(1):_u2' fq2"l 0' !* Overrubout means ignore ! fq2"e q1u2 ' !* Use the default ! "# q2m.vLast_0_Mini-Tag ' !* Make new form default ! !Arg-Given! !* Come here if arg given ! < :s3"e !* Find first string ! q7j :i*8:_2 fserr' !* Erring if none like it ! fq4"e oInside ' !* Maybe skip next check ! :fb4"l !Inside! !* Check for 2nd string ! 0l :fb2"l fkc !* Check for stuff user gave! fq4@; !* Match if no trailer ! :fb4:;'' > !* Match if trailer follows ! 0l q7:w .u7 !* Update the value of here ! ff&2"n !* If an arg, ! [Last_0_Mini-Tag !* Bind tag default ! [Editor_Type !* Bind Editor Type ! qEditor_Type[0 !* Get old editor type ! fq0"g :i0,_0 ' !* Maybe add prefix ! :iEditor_Type20 !* Set up new editor type ! 1fsmodech !* Need to change modeline !  q9u7 ' !* Edit and return to start ! 0 !* If we go here, Unwind ! !& Find DEF:! !S Finds function whose is at car of list cursor is in! :i* <:@fll 1a-;:@; l>  !* N: Macro to find next sexp ! .[0[10[2[30[4 fnq0j !* 0: Point to return to ! !* 1,2,3: Temp ! 1:< -ful c mN !* Carefully, ... ! @flx1 q1u3 !* Get CAR of form ! f~1 LEXPR-SEND "e over ' !* Two ways in ! f~1 SEND "e !ver! 1u4 @fll mN !* If it is SEND, try harder ! @flf~ SELF "n ouch ' !* Give up if not SELF ! @fll mN !* Find next expression ! !"! 1a-'"e c ' !* Message key must be quoted ! "# 1a-:"n ouch '' !* or be a keyword ! @flx1 !* Save the message name ! <-ful 10f~(defmethod@;>10c!* Will err or find a DEFMETHOD ! mN 1a-("n ouch ' c mN !* Hop over paren, find flavor name ! @flx2 !* Assemble the function spec ! 1f+0u3 q3"n ok '"# ouch '' j s(defun_1 !* or the defun ! >"n !uch! fg 0 ' !* If error, beep and return ! !k! :i*Cfsechodisplay !* Clear echo area ! q4"n @ft(:METHOD_ ' !* Maybe type :METHOD leader ! q3:fcu3 @ft3:_ !* Type out name of function ! mN m()( 0fsechoactivew ) !* Run the continuation ! !& Find Method Def:! !S ...! [1 [2 !* 1: Flavor ! :i*1_2)[3 !* 2: Method ! !* 3: (CDR methodspec) ! j :s(defmethod_(3"l q3f;Meth ' !* Find a defmethod ! 1:< s(defflavor_1 !* Maybe find our defflavor ! mN @fll mN 1a-("n 0' !* Find component flavors list ! c .[4 !* 4: Saved point ! < q4j mN 1a-)@; .,(@fll.u4.)x*,q2m(m.m&_Find_Method_Def)> >w 0 !* Return failure code ! !& Show Arglist:! !S Shows arglist after fn! @flx*[1 !* Get arglist in q1 ! 1a-("n 0:g1-|"n q1:fcu1 ' !* Maybe upcase ! @ft1 f~1NIL"n !* Show arglist ! @ft_;lexpr' 0' !* Maybe mention lexprness ! f[bbindw g1 -d j d !* Get in temp buffer without parens! :< :@flk 1a-;"e k '"# i_ !* Iterate over arguments, getting ! 1a-|"n @fl@fc ' @fll '> !* them together and in uppercase ! zj 1:<-@:flk>"e j @:flk'"#hk' hx1 !* Get arglist back in q1 ! f]bbind @ft(1) 0 !* Show arglist ! !& Show Doc:! !S Shows doc for fn! .[1[2 !* 1: Start pos ! 1:< mN @fll mN 1a-"!'!"e !* Skip BVL and find doc string ! .u2 @fll mN 1a-)"n !* Assure a real doc string ! q2j @fl@t 0'' !* ! @ft No_documentation_found > !* Show failure ! !Mini-Arglist:! !S ...! m.m&_Show_Arglist,m(m.m&_Find_DEF) !Mini-Doc:! !S ...! m.m&_Show_Doc,m(m.m&_Find_DEF)