Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!fsg!skipnyc!skipsun!skip From: skip@skipnyc (Skip Gilbrech) Newsgroups: comp.emacs Subject: Re: ancient versions from emacs [TECO] Message-ID: Date: 18 Dec 90 22:02:19 GMT References: Sender: skip@skipsun.UUCP Organization: Fusion Systems Group, New York City Lines: 90 In-reply-to: mayer@porky.Acuson's message of 10 Dec 90 21:28:07 GMT In article mayer@porky.Acuson (Ronald &) writes: > From the gnu-emacs Frequently Asked Questions file: > >25: Where does the name "Emacs" come from? > > > > EMACS originally was an acronym for Editor MACroS. The first Emacs was > > a set of macros written by Richard Stallman for the editor TECO (Tape > > Editor and COrrector {Text Editor and COrrector?}) on a PDP-10. > > (Amusing fact: many people have told me that TECO code looks a lot like > > line noise.) > > Back in school we used to have a version of emacs which used TECO, and yes, > there does seem to be some resemblance to line noise. Unfortunatelly, my > account at school finally disappeared, and I can't find any of my TECO code. > Anyone out there willing to give us an example of your best (i.e. most like > line noise :-) TECO code? > Ron Mayer I don't have any real TECO code, but for years I used a dos text editor, pmate, whose macro language I understand is very similar to, and was based on, TECO. Anyway, for your amusement, I've included the macros I used in pmate. As someone else mentioned, the uncommented code runs much faster, so that's what gets loaded.. I used to keep a commented version around, but I can't find it, and anyway, this looks much more like line noise... By the way, I've changed all the real control characters in the macros (^X, ^A, etc.) to the 2-char. sequence: '^' + 'X', etc., to avoid mailer problems. Even though I wrote them, I'm not sure what all the macros do, so don't ask... ;-) As a side note, when I was good at them, I found pmate macros very handy for ad-hoc text manipulation... easier to use for small stuff than emacs lisp or most anything else I've used. Line noise follows: 0v9^[0v80^[0QF^[ ^X1G to write file and exit^[@K=27[BTE^[XE^[XH] ^X2G to kill buffer and exit^[@K=27[BTE^[XK^[XH] ^X3.D ^X4@99=0[GBuffer?^[((@K>"/)&(@K<":)){(@K-"/)V9B@9E}{((@K="t)!(@K="T)){BTE}}][.R] ^X5.M ^X6.G ^X7@80<4{}{(@80-4)v80}.A ^X8(@80+4)v80.A ^X9((@X/4)*4)v80.A ^X0.A ^XA0LTES^N ^[(@E=0)[-M][JE]ES^N ^[(@E=0)[-M#D] :E((@T=" )!(@T=0))[(@80)QX][(@80/8){I ^[}(@R){I ^[}] ^XC2QA@LV70@BV9B9KB9EIESC = Replace <^[I^AA^[I> with <^[I^AB^[I>, X = eXit^[B@9E [EUS^AA^[@E[QBGNot found, ESC = beginning, else stay here^[@K=27[.G]%] -S^AA^[G^A@9^[((@K="x)!(@K="X))[%]@K=27[C^AA^[^AB^[][M]] ^XD@1<10[I0^[]@1\I/^[@0<10[I0^[]@0\I/^[@2\-4M2D2M ^XF0V1.X ^XG(@70-@L)L ^XHB9KB9EXIC:\ETC\PMATE.OLR^[A ^XL(@A-@L)L ^XM@LV70 ^XN((@T>96)&(@T<123))[@T-32R][(@T>64)&(@T<91){@T+32R}{M}] ^XR[((@T=32)!(@T=9)){M}{_}]T^[[S^W^[-M(((@T=32)!(@T=9))!(@T=13)){_}{M}]^[#[.N] ^XS200qp@bv9^[2qa0v7b5kb5ei^Aa^[b8kb8ei^Ab^[atz[@c=0_((@t=":)!(@t="\)){m#b9c1v7_}{-m}] xk^[xl^Ab^[a((@t=0')&(@7=0')){a[b9gl@t=0_]}b9k0v7b@9e.+ ^XT1v1.x ^XX@t=0[%] [2v0gT=TEXT, I=IMAGE^[((@k="t)!(@k="T))[0v0]((@k="i)!(@k="I))[1v0]@0=2[%] l-m@t=13'[mi ^[-m]l-lb9cb9g-2lixfr ^[s ^[-m@0=1[i/i^[]@1=0[i from ^[][i to ^[]d@0=1[s ^[-mi/i^[]l] ^X>1v7.+ ^X+@bv9 [@7=2_@7=1jBb8ea @t=0{i<^[i^A@5^[i> not found^[b9ea@tv7b8e@7=0{i, no matching files^[}{i in ^[i^A@9^[}gHit any key^[_} 1b9mb9ez-db7kb7e1xi^A@9^[0v5^[@lv6^[0v7 :B.= ]b@9e ^X=b7e [@7=1jDb6kb6eiLooking for <^[i^A@5^[i> in ^[i^A@9^[b7e0g^A@6^[ a@t=0{b6kb6ei<^[i^A@5^[i> not found in ^[i^A@9^[b7e0g^A@6^[%} :D0v7es^A@5^[@e{@6v5xk^[1xi^[@lva6^}-s^A@5^[(@5+@l)v4 b6kb6eiFound at line ^[@4\i in ^[i^A@9^[i, ESC = continue search^[ b7eg^A@6^[m(@k=27'){2v7^[8v9^[0gCall Macro '.>' to continue search^[4qd%}jD] ^X -- Skip Gilbrech email: skip@fsg.com Fusion Systems Group uunet!fsg!skip 225 Broadway, 35th Floor uunet!skipnyc!skip New York, NY 10007 phones: 212-285-8001 (work) 201-825-8732 (home)