(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) (FILECREATED "16-May-90 16:23:16" {DSK}local>lde>lispcore>sources>EDIT.;2 138537 changes to%: (VARS EDITCOMS) previous date%: "23-Nov-87 15:31:02" {DSK}local>lde>lispcore>sources>EDIT.;1) (* ; " Copyright (c) 1983, 1984, 1985, 1986, 1987, 1990 by Venue & Xerox Corporation. All rights reserved. The following program was created in 1983 but has not been published within the meaning of the copyright law, is furnished under license, and may not be used, copied and/or disclosed except in accordance with the terms of said license. ") (PRETTYCOMPRINT EDITCOMS) (RPAQQ EDITCOMS [ (* ;; "the teletype editor") (FNS TTY/EDITE TTY/EDITL %## EDIT* EDIT%: EDITDEFAULT EDITDEFAULT1 EDITH EDITRAN EDITTO EDITXTR EDLOC EDLOCL EDOR EDRPT EDUP ESUBST ESUBST1 EDITFERROR EDITFA EDITELT UNSAVEBLOCK? EDITF1 EDITF2 EDITL0 EDITL1 EDITL2 UNDOEDITL EDITCOM EDITCOMA EDITCOML EDITCONT EDITMAC EDITMBD EDITMV EDITCOMS EDIT!UNDO UNDOEDITCOM UNDOEDITCOM1 EDITCOM1 EDITSAVE EDITSAVE1 EDITSMASH EDITSMASH1 EDITSW EDITNCONC EDITAPPEND EDIT1F EDIT2F EDIT4E EDIT4E1 EDITQF EDIT4F EDIT4F1 EDIT4F2 EDIT4F3 EDITFPAT EDITFPAT1 EDITFINDP FEDITFINDP EDITBELOW EDITBF EDITBF1 EDITNTH BPNT BPNT0 EDIT.RI EDIT.RO EDIT.LI EDIT.LO EDIT.BI EDIT.BO) (INITVARS (EDITRDTBL (COPYREADTABLE "OLD-INTERLISP-T"))) (USERMACROS ED) (BLOCKS (EDITBLOCK TTY/EDITL EDITL0 EDITL1 UNDOEDITL EDITCOM EDITCOMA EDITCOML EDITMAC EDITCOMS EDIT!UNDO UNDOEDITCOM UNDOEDITCOM1 EDITCOM1 EDITSMASH EDITSMASH1 EDITNCONC EDITAPPEND EDIT1F EDIT2F EDITNTH BPNT BPNT0 EDIT.RI EDIT.RO EDIT.LI EDIT.LO EDIT.BI EDIT.BO EDITDEFAULT EDITDEFAULT1 %## EDUP EDIT* EDOR EDRPT EDLOC EDLOCL EDIT%: EDITMBD EDITXTR EDITELT EDITCONT EDITSW EDITMV EDITTO EDITBELOW EDITRAN EDITSAVE EDITSAVE1 EDITH (ENTRIES TTY/EDITL EDITL0 %## UNDOEDITL BPNT0 EDITCONT EDLOCL) (SPECVARS L ATM COM LCFLG %#1 %#2 %#3 UNDOLST UNDOLST1 LASTAIL MARKLST UNFIND LASTP1 LASTP2 COMS EDITCHANGES EDITHIST0 LISPXID USERHANDLE) (RETFNS EDITL0 EDITL1) (BLKAPPLYFNS EDIT%: EDITMBD EDITMV EDITXTR EDITSW) (BLKLIBRARY NTH LAST MEMB NLEFT) (NOLINKFNS PRINTDEF EDITRACEFN EDITUSERFN) (LOCALFREEVARS FINDFLAG EDITHIST UNDOLST1 COM L L0 COM0 UNDOLST EDITLFLG ATM MARKLST EDITHIST0 UNFIND TYPEIN LCFLG LASTP1 LASTP2 LASTAIL COPYFLG ORIGFLG COMS TOFLG C LVL EDITCHANGES EDITLISPFLG) (GLOBALVARS EDITCALLS P.A.STATS EDITUNDOSTATS EDITUNDOSAVES SPELLSTATS1 P.A.STATS EDITUSERFN EDITIME DONTSAVEHISTORYCOMS COMPACTHISTORYCOMS EDITEVALSTATS MAXLOOP EDITCOMSL EDITCOMSA DWIMFLG CLISPTRANFLG EDITOPS HISTORYCOMS REREADFLG HISTSTR3 EDITRDTBL EDITHISTORY HISTSTR0 LISPXHISTORY LISPXBUFS EDITRACEFN EDITMACROS USERMACROS CLISPARRAY CHANGESARRAY COMMENTFLG **COMMENT**FLG EDITSMASHUSERFN)) (EDITFINDBLOCK EDIT4E EDIT4E1 EDITQF EDIT4F EDITFPAT EDITFPAT1 EDIT4F1 EDIT4F2 EDIT4F3 EDITSMASH EDITSMASH1 EDITFINDP EDITBF EDITBF1 ESUBST (ENTRIES EDIT4E EDIT4E1 EDITQF EDIT4F EDITFPAT EDITFINDP EDITBF ESUBST) (LOCALFREEVARS C3 CHANGEFLG N TOPLVL FF NEWFLG FLG) (GLOBALVARS EDITUNDOSAVES CHCONLST2 EDITQUIETFLG CHCONLST1 MAXLEVEL UPFINDFLG CLISPTRANFLG CHANGESARRAY CLISPARRAY EDITHISTORY) (SPECVARS ATM L COM UNFIND LASTAIL UNDOLST1 EDITCHANGES)) (NIL EDITFA TTY/EDITE (SPECVARS EDITCHANGES EDITFN))) (GLOBALVARS FILELST DWIMFLG DWIMWAIT DWIMLOADFNSFLG) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA %##) (NLAML EDITF2) (LAMA]) (* ;; "the teletype editor") (DEFINEQ (TTY/EDITE [LAMBDA (EXPR COMS ATM TYPE IFCHANGEDFN) (* ; "Edited 20-Nov-87 14:25 by woz") (* ;; "Used by both EDITF and EDITV. Calls EDITL in such a way that if a change occurs, and EDITL is exited via OK, STOP, or even conrol-D, the appropriate call to NEWFILE? is executed. Since it checks to see if a change has been made, it also does the UNSAVEDEFING for EDITF in he case that we are editing a PROP. Value is the edited expression or generates an error.") (RESETLST (PROG ((ECHOFILE (SELECTQ (SYSTEMTYPE) (D (TTYINFOSTREAM)) T)) EDITCHANGES TEM) (COND ((NLISTP EXPR) (ERROR EXPR '"not editable." T))) [AND ATM (RESETSAVE NIL (CONS 'EDITF2 (SETQ EDITCHANGES (LIST ATM NIL TYPE IFCHANGEDFN EXPR] (PREEDITFN ATM TYPE EDITCHANGES) (* ;  "extensions to handle editing property lists, vars etc.") [ERSETQ (SETQ TEM (COND ((SETQ EXPR (LAST (EDITL (LIST EXPR) COMS ATM NIL EDITCHANGES))) (CAR EXPR)) (T (HELP "EDITL returned NIL"] (COND ((CADR EDITCHANGES) (* ; "A change was made.") (COND ((NULL TEM) (ERROR!))) (SELECTQ TYPE (FNS (* ;;  "eliminate PROP edit type. just call PUTDEF, and let it worry about being smart about DFNFLG.") (PUTDEF ATM 'FNS TEM 'CHANGED)) (PROP (HELP "PROP edit type is no longer supported." "Where did this come from?")) (VARS (SAVESET ATM TEM NIL 'NOSAVE)) (PROPLST (/SETPROPLIST ATM TEM)) NIL)) ((NULL TEM) (ERROR!)) ((EQ TYPE 'PROP) (PRIN1 '"not changed, so not unsaved " ECHOFILE T))) (COND ((AND TYPE ATM ADDSPELLFLG) (ADDSPELL ATM (SELECTQ TYPE ((FNS PROP) NIL) (VARS T) (PROPLST 0) 0)) (* ;; "TYPE is FNS or PROP for calls from EDITF, VARS for calls from EDITV, and PROPLST for calls from EDITP. TYPE can also be a prettytype. Can also be the name of a CHANGEDLST in the case of a direct call from the user.") )) (RETURN TEM]) (TTY/EDITL [LAMBDA (L COMS ATM MESS EDITCHANGES) (* DD%: "20-Oct-81 14:02") (* ;  "Takes edit push-down list L as argument. Returns L as value.") (COND ((NLISTP L) L) (T (PROG (LASTAIL MARKLST UNDOLST UNDOLST0 UNDOLST1 UNFIND LASTP1 LASTP2 TEM1 TEM2 EDITHIST0 EDITIME0 EDITLISPFLG) (* ;  "EDITCHANGES is a cell used for destructively marking whether the edit has caused any changes.") (COND ((EQ (CAR (LISTP COMS)) 'START) (SETQ READBUF (CDR COMS)) (SETQ COMS NIL))) [COND ((AND ATM (NULL COMS) EDITHISTORY) (SETQ EDITHIST0 T) (LISPXWATCH EDITCALLS) (SETQ EDITIME0 (CLOCK 0] (SETQ TEM2 (CAR (LAST L))) (* ;; "TEM2 is the top level xpression. NOte that L is usually a list of only one element, i.e. you usually start editing at the top, but not necessarily, since editl can be called dirctly.") [COND ([OR [EQ TEM2 (CAR (LAST (CAR (SETQ TEM1 (GETPROP 'EDIT 'LASTVALUE] [AND ATM (EQ TEM2 (CAR (LAST (CAR (SETQ TEM1 (GETPROP ATM 'EDIT-SAVE] (SOME (CAR LISPXHISTORY) (FUNCTION (LAMBDA (X) (EQ TEM2 (CAR (LAST (CAR (SETQ TEM1 (CADR (FMEMB 'EDIT X] (* ;; "First clause is old method of always saving last call on editor property list. Second clause searches history list for a call to editor corresponding to this expression.") (AND (NULL (CDR L)) (SETQ L (CAR TEM1))) (* ;; "if editor was called with an edit chain specified, rather just list of the xpression, use this chain.") (SETQ MARKLST (CADR TEM1)) (SETQ UNDOLST (CADDR TEM1)) [COND ((CAR UNDOLST) (* ; "Don't want to block it twice.") (SETQ UNDOLST (CONS NIL UNDOLST] (SETQ UNDOLST0 UNDOLST) (* ;; "Marks UNDOLST as of this entry to editor, so UNDO of this entire EDIT session won't go too far back.") (SETQ UNFIND (CDDDR TEM1] (COND ([PROG1 (NLSETQ (SETQ L (EDITL0 L COMS MESS T))) [COND (UNDOLST1 (SETQ UNDOLST (CONS (CONS T (CONS L UNDOLST1)) UNDOLST] (COND ((NEQ UNDOLST UNDOLST0) (AND LISPXHIST (UNDOSAVE (LIST 'UNDOEDITL L UNDOLST UNDOLST0) LISPXHIST)) (* ;  "Takes care of making the entire call to EDITL undoable.") )) (COND (EDITIME0 (SETATOMVAL 'EDITIME (IPLUS EDITIME (IDIFFERENCE (CLOCK 0) EDITIME0] (* ;; "If one of COMS causes an error, or if call to session is terminated by a STOP, still want to move undo information to LISPXHISTORY.") (RETURN L)) (T (ERROR!]) (%## [NLAMBDA COMS (PROG ((L (EVQ L)) UNDOLST1 (LASTAIL (EVQ LASTAIL)) (MARKLST (EVQ MARKLST)) (UNFIND (EVQ UNFIND))) (* ;; "## is an external entry to the editblock, so local freevariables must be looked up or traps will occur. LASAIL, MARKLT, and UNDOLST1 are rebound (and therefore looked up) here to avoid their being changed by the call to ##. The rest are looked up in EDITL0 because it is called with EDITLFLG=nil.") (RETURN (CAR (COND ((NULL COMS) L) (T (EDITL0 L COMS]) (EDIT* [LAMBDA (N) (* ;; "Equivalent to a !0 followed by an appropriate number.") (CAR (SETQ L (PROG (COM (L L) [X (PROG ((L L)) (EDUP) (RETURN (CAR L] TEM) (* ;; "COM is rebound here because EDITCOM resets it so that 'CURRENT' command is typed when failure occurs. However, want to see BK typed, not !0 or -3") (EDITCOM '!0) (SETQ TEM (CAR L)) [COND ([COND ((MINUSP N) (SETQ TEM (NLEFT TEM (MINUS N) X))) (T (LISTP (SETQ TEM (CDR (NTH X N] (SETQ LASTAIL TEM) (RETURN (CONS (CAR TEM) L] (ERROR!]) (EDIT%: [LAMBDA (TYPE LC X) (* DD%: " 7-Oct-81 20:49") (PROG (TOFLG) [SETQ X (MAPCAR X (FUNCTION (LAMBDA (X) (COND [(EQ (CAR (LISTP X)) '%##) (PROG ((L L) UNDOLST1 (LCFLG T)) (RETURN (COPY (EDITCOMS (CDR X] (T X] (COND (LC [COND ((EQ (CAR (LISTP LC)) 'HERE) (SETQ LC (CDR LC] (EDLOC LC T))) (EDUP) (SELECTQ TYPE ((B BEFORE) (EDIT2F -1 X)) ((A AFTER) (COND ((CDAR L) (EDIT2F -2 X)) (T (EDITCOML (CONS 'N X) COPYFLG)))) ((%: FOR) [COND ((OR X (CDAR L)) (EDIT2F 1 X)) ((MEMB (CAR L) (CADR L)) (* ;; "Singleton list, e.g. (-- ((A)) --) (DELETE A) --- result is (-- NIL --); or (-- (A) --) and say (DELETE A 1) result is (-- NIL --)") (EDUP) (EDIT2F 1 (LIST NIL))) (T (* ;  "Delete last element of list of more than 1 element.") (EDITCOMS '(0 (NTH -2) (2]) (ERROR!)) (RETURN L]) (EDITDEFAULT [LAMBDA (EDITX) (* rmk%: " 6-JUN-82 15:13") (DECLARE (GLOBALVARS LPARKEY)) (PROG (EDITY EDITZ LISPXHIST) (* ;; "LISPXHIST is rebound so that messages associated with spelling corrections will not appear on history list.") (COND [(AND (LISTP EDITX) (SETQ EDITY (FASSOC (CAR EDITX) EDITOPS))) (RETURN (EDITRAN EDITX (CDR EDITY] [LCFLG (RETURN (COND ((EQ LCFLG T) (EDITQF EDITX)) (T (* ; "E.g. LCFLG= _ in BELOW command.") (EDITCOM (LIST LCFLG EDITX) TYPEIN] [(NLISTP EDITX) (COND ((AND EDITHISTORY TYPEIN (FMEMB EDITX HISTORYCOMS)) (RETURN (EDITH EDITX))) ((AND EDITUSERFN (SETQ EDITY (EDITUSERFN EDITX))) (RETURN (EDITCOM EDITY TYPEIN))) ((AND (NOT (U-CASEP EDITX)) (FMEMB (SETQ EDITY (U-CASE EDITX)) EDITCOMSA)) (SETQ EDITX EDITY) (GO BACKUP)) ((OR (FMEMB EDITX EDITCOMSL) (AND EDITY (FMEMB EDITY EDITCOMSL) (SETQ EDITX EDITY))) (COND ((AND [NULL (CDR (SETQ EDITX (COND (TYPEIN (READLINE EDITRDTBL (LIST EDITX))) ((EQ EDITX (CAR COMS)) (EDITSMASH COMS (CONS (CAR COMS) (CDR COMS))) (CAR COMS] (NEQ (CAR EDITX) '%:)) (* ;; ": by itself means DELETE if nothing else follows it. : is not an atomic command so that : -- will work as a line command.") (ERROR!))) (AND TYPEIN (EDITSAVE1 EDITX T))) ((AND TYPEIN (NULL REREADFLG) (EQ LPARKEY (NTHCHAR EDITX 1))) [EDITDEFAULT1 (SETQ EDITY (RPLSTRING EDITX 1 '"("] (GNC EDITY) [SETQ EDITX (READLINE EDITRDTBL (LIST (MKATOM EDITY] (AND EDITHIST (FRPLACA (CAAAR EDITHISTORY) EDITX))) ((AND TYPEIN (NULL REREADFLG) (FNTYP EDITX) (COND ([NULL (AND (CDR (SETQ EDITY (READLINE EDITRDTBL (LIST EDITX) T))) (NULL (CDDR EDITY)) (OR (NULL (CADR EDITY)) (LISTP (CADR EDITY))) (NOT (FMEMB (CAADR EDITY) EDITCOMSL] (SETQ READBUF (APPEND (CDR EDITY) (CONS HISTSTR0 READBUF))) (* ; "put it back.") NIL) (T T))) (EDITDEFAULT1 'E EDITX) (AND EDITHIST (FRPLACA (CAAR EDITHISTORY) (SETQ EDITX EDITY))) (EDITH '!E) (RETURN)) ([AND DWIMFLG (OR TYPEIN (EQ EDITX (CAR COMS))) (SETQ EDITY (COND ((AND (EQ (NTHCHARCODE EDITX -1) (CHARCODE P)) (GLC (SETQ EDITY (MKSTRING EDITX))) (SELECTQ (SETQ EDITY (MKATOM EDITY)) ((^ _ UP NX BK !NX UNDO REDO CL DW) T) (NUMBERP EDITY))) (* ;  "The GLC removes the last character.") (EDITDEFAULT1 EDITY 'P) (CONS EDITY 'P)) (T (FIXSPELL EDITX 70 EDITCOMSA (NULL TYPEIN) T] [COND ((LISTP EDITY) [COND [TYPEIN (SETQ READBUF (CONS (CDR EDITY) (CONS HISTSTR0 READBUF] (T (EDITSMASH COMS (CAR EDITY) (CONS (CDR EDITY) (CDR COMS] (SETQ EDITY (CAR EDITY))) ((NULL TYPEIN) (EDITSMASH COMS EDITY (CDR COMS] (SETQ EDITX EDITY) (GO BACKUP)) ([AND [CDR (SETQ EDITY (COND (TYPEIN (READLINE EDITRDTBL (LIST EDITX))) ((EQ EDITX (CAR COMS)) COMS] (COND ((NEQ (CAR EDITY) EDITX) (* ;  "In the call to READLINE above, the user typed control-U and changed the command himself.") T) ((AND DWIMFLG (SETQ EDITZ (FIXSPELL EDITX 70 EDITCOMSL (NULL TYPEIN) T))) (* ;  "E.g. user types MBBD -- without parentheses.") (COND [(LISTP EDITZ) (EDITSMASH EDITY (CAR EDITZ) (CONS (CDR EDITZ) (CDR EDITY] (T (EDITSMASH EDITY EDITZ (CDR EDITY] (AND (NULL TYPEIN) (EDITSMASH COMS (CONS (CAR COMS) (CDR COMS))) (SETQ EDITY (CAR COMS))) (SETQ EDITX EDITY) (EDITSAVE1 EDITX T)) (T (EDITSAVE1 EDITY T) (ERROR!] ((AND EDITHISTORY (FMEMB (CAR EDITX) HISTORYCOMS)) (RETURN (EDITH EDITX))) ((AND EDITUSERFN (SETQ EDITY (EDITUSERFN EDITX))) (RETURN (EDITCOM EDITY TYPEIN))) ((NLISTP EDITX) (ERROR!)) ((AND (EQ (CAR EDITX) '!) (NULL (CDR EDITX))) (EDITDEFAULT1 '(1)) (FRPLACA EDITX 1)) ((AND (EQ (CAR EDITX) '%#) (NULL (CDR EDITX))) (EDITDEFAULT1 '(3)) (FRPLACA EDITX 3)) [(AND DWIMFLG (ATOM (CAR EDITX)) (SETQ EDITY (FIXSPELL (CAR EDITX) 70 EDITCOMSL (NULL TYPEIN) T))) (COND [(LISTP EDITY) (EDITSMASH EDITX (CAR EDITY) (CONS (CDR EDITY) (CDR EDITX] (T (EDITSMASH EDITX EDITY (CDR EDITX] (T (ERROR!))) [RETURN (COND ((EQ REREADFLG 'ABORT) NIL) (T (EDITCOM (SETQ COM EDITX) TYPEIN] BACKUP (SETQ COM EDITX) (COND ((AND EDITHIST TYPEIN (NULL REREADFLG)) (FRPLACA EDITHISTORY (CDAR EDITHISTORY)) (FRPLACA (CDR EDITHISTORY) (SUB1 (CADR EDITHISTORY))) (EDITSAVE COM) (* ;; "Can't just smash com onto front of history because now that it has been corrected, EDITSAVE may not actually save it, e.g. suppose COM is a misspelled P.") )) (RETURN (EDITCOM COM TYPEIN]) (EDITDEFAULT1 [LAMBDA (X Y) (* ; "Edited 10-Nov-87 14:06 by jds") (PRIN1 "=" T) (COND ((STRINGP X) (PRIN1 X T)) (T (PRIN2 X T T))) (COND (Y (SPACES 1 T) (PRIN2 Y T T))) (TERPRI T) (LISPXWATCH SPELLSTATS1]) (EDITH [LAMBDA (C) (* ; "wt: 5-APR-77 17 56") (PROG (X COMS LINE TEM) [SELECTQ C ((DO !E !F !N) (* ;  "USE is used when operator was incorrect, wheras DO is used when operator was omitted.") [SETQ X (SELECTQ C (!E (* ;  "!E is equivalent to DO E, !F to DO F, and !N to DO N.") 'E) (!F 'F) (!N 'N) (COND ((NULL (SETQ LINE (READLINE EDITRDTBL))) (ERROR!)) (T (CAR LINE] (SETQ COMS (LISPXFIND EDITHISTORY NIL 'INPUT)) (* ;; "If COMS is a LINE command, e.g. FIE FUM, DO COMS is the same as (COMS FIE FUM) If COMS is a list command, e.g. (FIE FUM), same as (COMS (FIE FUM))") [COND ((SETQ TEM (FMEMB HISTSTR0 COMS)) (COND ((CDR TEM) (SETQ COM C) (ERROR!)) (T (* ; "removes the last ' followed by the new atom or string.") (RETURN (DREVERSE (CONS (CONS LST2 LST1) MATCH] ((NEQ EDITQUIETFLG T) (PRIN1 '= T) (PRINT X T T))) (RETURN T]) (EDITQF [LAMBDA (PAT) (PROG (Q1) (COND ([AND (LISTP (SETQ Q1 (CAR L))) (SETQ Q1 (MEMB PAT (COND ((EQ (CAR Q1) CLISPTRANFLG) (CDDDR Q1)) (T (CDR Q1] (SETQ L (CONS (COND (UPFINDFLG Q1) (T (SETQ LASTAIL Q1) (CAR Q1))) L))) (T (EDIT4F PAT 'N]) (EDIT4F [LAMBDA (PAT C3 CHANGEFLG CHARFLG) (* ; "Edited 10-Nov-87 14:36 by jds") (* ;; "Searches the expression being edited, starting from current point and continuing in print order, until a position is found for which the current level list matches PAT. Then, if (CAR L) is atomic, effectively does an UP (unless UPFINDFLG=NIL) Thus F (SETQ X --) and F SETQ will produce the same result. --- If C3 is T, the search starts with the current exppession. If C3 is 'N', the search skips the current expression, although it does search inside of it.") (PROG (LL X TAIL (FF (CONS)) (TOPLVL (NULL C3)) N NEWFLG (PAT0 PAT)) [COND ((EQ [CAR (LISTP (CDR (LISTP PAT] '|..|) (RETURN (EDITCONT (CAR PAT) (CDDR PAT) C3] (SETQ PAT (EDITFPAT PAT T)) (* ; "Checks PAT for altmodes.") (SETQ LL L) (COND (CHANGEFLG (SETQ N (COND ((NUMBERP CHANGEFLG) CHANGEFLG) (T (* ; "Means change all occurrences.") -1))) (SETQ TOPLVL NIL) (SETQ C3 (EDITFPAT1 C3)) [AND CHARFLG (NLISTP PAT) (NLISTP C3) [SETQ PAT (CONS ' (CONS ' (NCONC1 (UNPACK PAT) '] (SETQ C3 (CONS ' (CONS ' (NCONC1 (UNPACK C3) '] (* ;; "If CHARFLG is T and neither pattern nor format contain alt-modes, supply them, i.e. user wants a character replacement operation. This option is used by the RC and RC1 commands, and by ESUBST.") ) [(EQ C3 'N) (SETQ N 1) [COND ((NLISTP (CAR L)) (GO LP1)) ((EQ (CAAR L) CLISPTRANFLG) (SETQ X (CADDAR L))) (T (SETQ X (CAAR L] (SETQ LL (CONS X L)) (COND ((AND (NLISTP X) UPFINDFLG) (* ;; "E.g. If at (COND --) and do F COND, cannot be allowed to match with this COND, as the subsequent UP would leave you right where you started. However, if UPFINDFLG is NIL, then it is ok to match with this COND.") (GO LP1] (T (SETQ N C3))) (COND ((NOT (NUMBERP N)) (SETQ N 1))) [COND ([COND [(TAILP (CAR LL) (CADR LL)) (AND (EQ (CAR (LISTP PAT)) '|...|) (EDIT4E (CDR PAT) (CAR LL] (T (EDIT4E PAT (CAR LL] (* ;; "This EDIT4E check is necessary because once search starts, EDIT4F1 is always looking down one level, i.e. at car's of list it is examining. Similarly, since once the search starts, tails are only matched against patterns beginning with ..., we do not call EDIT4E here on a TAIL unless the pattern also begins with ...") (COND [CHANGEFLG (COND ([NULL (AND (EQ PAT '&) (LISTP (CAR L] (* ;; "R can't work if you are already there, e.g. current expression is B and user says (R B C), or current expression is (CAR X) and user says (R (CAR X) (CDR Y)). The AND check is to enable commands like (r1 & $.) to work. In this case, it is assumed that & meant the first element in the current expression, not the current expression itself.") (PRIN1 "can't " T T) (ERROR!] ((ZEROP (SETQ N (SUB1 N))) (RETURN (SETQ L LL] (SETQ X (CAR LL)) LP (COND [(EDIT4F1 PAT X MAXLEVEL TAIL) (AND (CDR L) (SETQ UNFIND L)) (RETURN (CAR (SETQ L (NCONC (CAR FF) (COND ((EQ (CADR FF) (CAR LL)) (* ; "To avoid repetitions.") (CDR LL)) (T LL] (TOPLVL (GO ERROR)) ((EQ CHANGEFLG T) (* ;; "R command only affects current expression. However, R1 is equivalent to an F and then a replacement and so is allowed to search above the current expression.") (COND (NEWFLG (RETURN T))) (GO ERROR))) LP1 (SETQ X (CAR LL)) (* ;  "Ascend from this element and begin searching the next element in the next higher list.") (COND ((NULL (SETQ LL (CDR LL))) (COND (NEWFLG (* ;  "This was a replacement operation which has found a successful match.") (RETURN T))) (GO ERROR)) ([SETQ TAIL (COND ((AND (EQ X (CAR LASTAIL)) (TAILP LASTAIL (CAR LL))) (* ;; "This is sort of an open UP. It is necessary to handle the case where the current expression is atomic and the next higher expression contains two instances of it.") LASTAIL) (T (MEMB X (CAR LL] (SETQ X (CDR TAIL)) (GO LP))) (GO LP1) ERROR (SETQ COM PAT0) (ERROR!]) (EDIT4F1 [LAMBDA (PAT X LVL TAIL) (* wt%: " 5-APR-78 11:07") (* ;; "In most cases, EDIT4F1 treats X as a list, and matches PAT against elements of X. However, if TAIL is not NIL, EDIT4F1 will also look at X itself if (1) X is not a list (this covers the case where a list ends in an atom other than NIL), or (2) PAT begins with ... In both cases, X is EQ to CDR of TAIL, and TAIL is used if replacement is being carried out.") (PROG ((L L) TEM XX) (AND CHANGEFLG (NEQ X (CAR L)) (SETQ L (CONS X L))) (* ;; "So that if there are any replacements in CLISP expressions that have been translated, editsmash will know to remove the translations.") [COND ((AND (LISTP X) (NULL TAIL) (EQ (CAR X) CLISPTRANFLG)) (SETQ XX X) (SETQ TAIL (CDR X)) (SETQ X (CDDR X] LP (COND ((AND (LISTP PAT) (EQ (CAR PAT) '...)) (* ;; "This check is made before the NULL check because F (...) is acceptable and means find the first list ending in NIL.") (GO CHECK...)) ((NULL X)) ((AND LVL (NOT (IGREATERP LVL 0))) (* ; "NIL = infinity.") (PRIN1 '"maxlevel exceeded. " T)) ((LISTP X) (GO ELEMENT)) ((AND TAIL (SETQ TEM (EDIT4E PAT X CHANGEFLG))) (* ;  "Compares PAT with atomic tail of a list.") [COND (CHANGEFLG (SETQ X (EDIT4F2 TAIL TEM C3 T] (COND ((ZEROP (SETQ N (SUB1 N))) (GO SUCC))) (* ;; "Note that the current expression is left at the (atomic) tail to prevent accidents like (MOVE FOO TO ...) and FOO is CDR of (FIE . FOO)") )) (RETURN NIL) CHECK... (COND [(AND TAIL (SETQ TEM (EDIT4E (CDR PAT) X CHANGEFLG))) (* ;  "Note that at this point, X may still be atomic, as in F (... . B)") [COND (CHANGEFLG (SETQ X (EDIT4F2 TAIL TEM C3 T] (COND ((ZEROP (SETQ N (SUB1 N))) (GO SUCC)) (CHANGEFLG (* ;; "Don't want to go to LP1 because you don't want to search through new structure inserted by replacement.") (RETURN NIL)) ((NLISTP X) (RETURN NIL)) (T (GO LP1] ((NLISTP X) (RETURN NIL)) (T (* ;  "PAT is a ... pattern, so don't compare it with elements.") (GO DESCEND))) ELEMENT [COND ((SETQ TEM (EDIT4E PAT (CAR X) CHANGEFLG)) (COND (CHANGEFLG (EDIT4F2 X TEM C3))) (COND ((ZEROP (SETQ N (SUB1 N))) [COND ((OR (NULL UPFINDFLG) (LISTP (CAR X))) (* ;; "Instead of adding atom and then doing UP --- this check is made and atom not added if UPFINDFLG is T.") (SETQ LASTAIL X) (* ; "For use by UP.") (SETQ X (CAR X] (GO SUCC)) (CHANGEFLG (* ;; "Don't want to go to DESCEND because you don't want to search through new structure inserted by replacement operation.") (GO LP1] DESCEND (COND ((AND (NULL TOPLVL) (LISTP (CAR X)) (EDIT4F1 PAT (CAR X) (AND LVL (SUB1 LVL))) (ZEROP N)) (SETQ X (CAR X))) (T (GO LP1))) SUCC (AND XX (EQ X (CDDR XX)) (SETQ X XX)) (* ; "CLISP expression.") (COND ([AND FF (NOT (AND X (EQ X (CADR FF] (* ; "To eliminate repetitions.") (TCONC FF X))) (RETURN (OR FF T)) LP1 (SETQ TAIL X) (SETQ X (CDR X)) (AND LVL (SETQ LVL (SUB1 LVL))) (GO LP]) (EDIT4F2 [LAMBDA (NODE MATCH FORMAT CDRFLG) (* ; "Edited 10-Nov-87 14:37 by jds") (* ;; "Analagous to CONSTRUCT in FLIP, with EDITFPAT1 playing the role of FORMTRAN. Replaces CAR of NODE by FORMAT (CDR if CDRFLG=T). MATCH is the value returned by EDIT4E. If MATCH is a list of pointers and FORMAT begins with $, EDIT4F2 assembles a new atom or string, replacing those sequences not matched by alt-modes with elements from NEW. For example, user types (R $1 $2) then all terminal 1's will be changed to 2's.") (PROG ([X (COND (CDRFLG (CDR NODE)) (T (CAR NODE] FLG) (SETQ NEWFLG T) (* ;  "to let EDIT4F know that a successful match was found.") (SETQ FORMAT (EDIT4F3 FORMAT MATCH X)) (COND ((EQ EDITQUIETFLG T) (GO OUT)) ((NEQ MATCH T) (* ; "EDIT4E printed X.") ) (FLG (* ;; "MATCH was T, indicating no alt-modes, and therefore X was not printed by EDIT4E1. However, FLG being T means a format was used, and therefore X must be printed here. For example, (R FOO $1)") (PRIN2 X T T)) (T (GO OUT))) (PRIN1 "->" T) (PRINT FORMAT T T) OUT [COND (CDRFLG (EDITSMASH NODE (CAR NODE) FORMAT)) (T (EDITSMASH NODE FORMAT (CDR NODE] (EDITSMASH1 FORMAT) (RETURN FORMAT]) (EDIT4F3 [LAMBDA (FORMAT MATCH X) (* lmm "18-NOV-82 13:54") (PROG (LST) (COND [(LISTP FORMAT) (COND ([EQ (CAR FORMAT) (CONSTANT (CHARACTER (CHARCODE ESCAPE] (SETQ FLG T)) (T (RETURN (CONS (EDIT4F3 (CAR FORMAT) MATCH X) (EDIT4F3 (CDR FORMAT) MATCH X] (T (RETURN FORMAT))) LP [COND [(NLISTP (SETQ FORMAT (CDR FORMAT))) (RETURN (COND ((AND (EQ MATCH T) (NULL (CDR LST))) (CAR LST)) ((STRINGP X) (CONCATLIST LST)) (T (PACK LST] [[EQ (CAR FORMAT) (CONSTANT (CHARACTER (CHARCODE ESCAPE] (SETQ LST (NCONC LST (COND ((EQ MATCH T) (* ;  "Permits user to say (R FOO $1) meaning change all FOO's to FOO1's, etc.") (LIST X)) (T (PROG1 (LDIFF (CAAR MATCH) (CDAR MATCH)) (SETQ MATCH (CDR MATCH] (T (SETQ LST (NCONC1 LST (CAR FORMAT] (GO LP]) (EDITFPAT [LAMBDA (PAT FLG) (* wt%: "23-NOV-76 1 45") (* ;; "Done once at beginning of find operation. Replaces atoms ending in alt-modes with patterns recognized by EDIT4E. Analagous to PATTRAN in FLIP, with role of MATCH being played by EDIT4E1.") (PROG (TEM) (RETURN (COND [(LISTP PAT) (COND ((OR (EQ (CAR PAT) '==) (EQ (CAR PAT) ') (EQ (CAR PAT) ')) PAT) (T (CONS (EDITFPAT (CAR PAT)) (EDITFPAT (CDR PAT] ((OR (EQ PAT ') (NOT (STRPOS ' PAT))) PAT) [(STRPOS '"" PAT -2) (* ;  "Used to specify a search for a 'close' word using SKOR. See comment in EDIT4E.") (SETQ TEM (CHCON PAT)) (FRPLACD (NLEFT TEM 3)) (CONS ' (CONS (LENGTH TEM) (CONS (PROG ((ND 0) CHAR) [MAPC TEM (FUNCTION (LAMBDA (X) (COND ((EQ X CHAR) (SETQ ND (ADD1 ND))) (T (SETQ CHAR X] (RETURN ND)) TEM] (T (CONS ' (COND (FLG (DUNPACK PAT CHCONLST1)) (T (UNPACK PAT]) (EDITFPAT1 [LAMBDA (X) (* rmk%: " 6-JUN-82 15:15") (* ;; "Analgous to FORMTRAN in FLIP, with EDIT4F2 playing the role of CONSTRUCT. Used by EDIT4F once at the beginning of a find operation that also specifies replacement --- i.e. an R command. Converts an atom or string containing alt modes into a list of the character sequences, e.g. if X is $ABC$DEF$ then the value of EDITFPAT1 is ($ $ ABC $ DEF $) (The first $ is merely a flag.)") (COND ((OR (LITATOM X) (STRINGP X)) (COND [(STRPOS ' X) (CONS ' (PROG ((N 1) (NC (NCHARS X)) VAL) LP (SETQ VAL (CONS [COND ((EQ (NTHCHARCODE X N) (CHARCODE ESCAPE)) ') (T (SUBSTRING X N (SETQ N (SUB1 (OR (STRPOS "" X N) 0] VAL)) [COND ((OR (EQ N -1) (IGREATERP (SETQ N (ADD1 N)) NC)) (RETURN (DREVERSE VAL] (GO LP] (T X))) [(LISTP X) (CONS (EDITFPAT1 (CAR X)) (EDITFPAT1 (CDR X] (T X]) (EDITFINDP [LAMBDA (X PAT FLG) (* Allows the user to use the edit find operation as a predicate without being  inside the editor or doing any conses.) (PROG ((N 1) CHANGEFLG LASTAIL TOPLVL FF) (AND (NULL FLG) (SETQ PAT (EDITFPAT PAT T))) (RETURN (OR (EDIT4E PAT X) (EDIT4F1 PAT X MAXLEVEL]) (FEDITFINDP [LAMBDA (LST AT) (* lmm "26-JUL-83 20:55") (OR (EQ AT LST) (AND (LISTP LST) (OR (FEDITFINDP (CAR LST) AT) (FEDITFINDP (CDR LST) AT]) (EDITBELOW [LAMBDA (PLACE DEPTH) (* ; "See comment in EDITCOML") (PROG ((L0 (PROG ((L L) (LCFLG '_)) (EDITCOM PLACE) (RETURN L))) L1 N) (COND ((NULL DEPTH) (SETQ COM C) (SETQ DEPTH 1)) ((MINUSP (SETQ COM (EVAL DEPTH))) (* ;  "If anything goes wrong from hhe on, the error message shuld print the value of DEPTH.") (ERROR!)) (T (SETQ DEPTH COM))) (SETQ L1 (REVERSE L)) (SETQ L0 (FMEMB (CAR L0) L1)) LP [COND ((NULL L0) (ERROR!)) [(ZEROP DEPTH) (FRPLACD L0) (SETQ UNFIND L) (RETURN (SETQ L (DREVERSE L1] ((NOT (TAILP (CADR L0) (CAR L0))) (SETQ DEPTH (SUB1 DEPTH] (SETQ L0 (CDR L0)) (GO LP]) (EDITBF [LAMBDA (PAT N) (PROG ((LL L) X Y (FF (CONS))) (* ;; "Same as EDIT4F, except searches in reverse printorder. If N is T (or at top level) search includes current expression, otherwise starts with first expression that would be printed before the current expression.") (SETQ COM PAT) (SETQ PAT (EDITFPAT PAT)) (COND ((OR (NLISTP (CAR LL)) (AND (NULL N) (CDR LL))) (* ;  "Do not examine current expression.") (GO LP1))) LP [COND ((EDITBF1 PAT (CAR LL) MAXLEVEL Y) (SETQ UNFIND L) (RETURN (CAR (SETQ L (NCONC (CAR FF) (COND ((EQ (CAR LL) (CADR FF)) (CDR LL)) (T LL] LP1 (SETQ X (CAR LL)) (COND ((NULL (SETQ LL (CDR LL))) (ERROR!)) ([OR (SETQ Y (MEMB X (CAR LL))) (SETQ Y (TAILP X (CAR LL] (GO LP))) (GO LP1]) (EDITBF1 [LAMBDA (PAT X LVL TAIL) (PROG [Y XX (...PAT (AND (LISTP PAT) (EQ (CAR PAT) '...] (AND (LISTP X) (EQ (CAR X) CLISPTRANFLG) (SETQ XX X) (SETQ X (CDDR X))) LP [COND ((AND LVL (NOT (IGREATERP LVL 0))) (PRIN1 '"maxlevel exceeded. " T) (RETURN NIL)) ((EQ TAIL X) (RETURN (COND ((AND (NOT ...PAT) (EDIT4E PAT X)) (* ;; "Only compare with X after you have searched inside it, e.g. if backing up to (COND -- (COND --)) should find inner COND.") (TCONC FF X] (SETQ Y X) LP1 (COND ([NULL (OR (EQ (CDR Y) TAIL) (NLISTP (CDR Y] (* ;  "TAIL is where you were last time. Go until you find the tail before it.") (SETQ Y (CDR Y)) (GO LP1))) (SETQ TAIL Y) (* ;  "Y is a tail of X, TAIL is CDR of Y.") (COND ((AND PAT (CDR TAIL) (NLISTP (CDR TAIL)) (EDIT4E PAT (CDR TAIL))) (* ; "Atomic tail.") (SETQ TAIL (CDR TAIL))) ((AND ...PAT (EDIT4E (CDR PAT) (CDR TAIL))) (SETQ TAIL (CDR TAIL))) ([AND (LISTP (CAR TAIL)) (EDITBF1 PAT (CAR TAIL) (AND LVL (SUB1 LVL] (* ;  "Descend first before comparing with outer one.") (SETQ TAIL (CAR TAIL))) [(AND (NOT ...PAT) (EDIT4E PAT (CAR TAIL))) (COND ((OR (NULL UPFINDFLG) (LISTP (CAR TAIL))) (SETQ LASTAIL TAIL) (SETQ TAIL (CAR TAIL] (T (AND LVL (SETQ LVL (SUB1 LVL))) (GO LP))) (AND XX (EQ TAIL (CDDR XX)) (SETQ TAIL XX)) (COND ([NOT (AND TAIL (EQ TAIL (CADR FF] (TCONC FF TAIL))) (RETURN FF]) (EDITNTH [LAMBDA (X N) (* ;; "If N is non-numeric, EDITELT is called, so that one can give commands such as (BI COND SETQ) meaning do a BI starting at the element containing COND up to the one containing SETQ.") (PROG (TEM) [COND ((NLISTP X) (ERROR!)) ((EQ (CAR X) CLISPTRANFLG) (SETQ X (CDDR X] (RETURN (COND ((NOT (NUMBERP N)) (* ;; "Normally EDITELT returns the element of this level list containing N. However, if N is atomic and ends with an alt-mode, it will fail the first FMEMB, and EDITELT will return the tail of the list, so the second MEMB will fail. This is the reason for the TAILP.") (OR (MEMB N X) (MEMB (SETQ N (EDITELT N (LIST X))) X) (TAILP N X))) ((ZEROP N) (ERROR!)) ([SETQ TEM (COND ((MINUSP N) (NLEFT X (IMINUS N))) (T (NTH X N] TEM) (T (SETQ COM N) (ERROR!]) (BPNT [LAMBDA (X) (* wt%: "14-MAY-76 18 42") (PROG (Y N Z) [COND ((ZEROP (CAR X)) (SETQ Y (CAR L)) (SETQ Z (CADR L))) (T (SETQ Y (CAR (EDITNTH (CAR L) (CAR X] [COND ((NULL (CDR X)) (SETQ N 1)) ([NULL (NUMBERP (SETQ N (CADR X] (ERROR!)) ((MINUSP N) (SETQ N (ADD1 N))) (T (* ;  "Makes (P 0 N) have same effect as it did in old system.") (SETQ N (SUB1 N] (RETURN (BPNT0 Y T N (OR (CADDR X) 20) Z]) (BPNT0 [LAMBDA (X FILE CARLVL CDRLVL TAIL) (* wt%: 11-MAY-76 18 0) (COND ((NULL (NLSETQ (LVLPRINT X FILE CARLVL CDRLVL TAIL))) (SETQ COM NIL) (ERROR!]) (EDIT.RI [LAMBDA (M N X) (PROG (A B) (SETQ A (EDITNTH X M)) (SETQ B (EDITNTH (CAR A) N)) (COND ((OR (NULL A) (NULL B)) (ERROR!))) [PROG ((L (CONS (CAR A) L))) (* ;; "The only reason for this is so that EDITSMASH will also check (CAR a) for clisp translation. Note that EDIT.RI is the only command which lets you change something INSIDE of (CAR L) (The R command for xample is rebinding L as it goes down.)") (MAPC (CDR B) (FUNCTION EDITSMASH1)) (EDITSMASH1 (CAR A)) (EDITSMASH A (CAR A) (EDITNCONC (CDR B) (CDR A] (EDITSMASH B (CAR B]) (EDIT.RO [LAMBDA (N X) (SETQ X (EDITNTH X N)) (COND ((OR (NULL X) (NLISTP (CAR X))) (ERROR!))) (EDITSMASH (SETQ N (LAST (CAR X))) (CAR N) (CDR X)) (EDITSMASH X (CAR X)) (EDITSMASH1 (CAR X]) (EDIT.LI [LAMBDA (N X) (SETQ X (EDITNTH X N)) (COND ((NULL X) (ERROR!))) (EDITSMASH X (CONS (CAR X) (CDR X))) (EDITSMASH1 (CAR X)) (EDITSMASH1 (CAR X]) (EDIT.LO [LAMBDA (N X) (SETQ X (EDITNTH X N)) (COND ((OR (NULL X) (NLISTP (CAR X))) (ERROR!))) (EDITSMASH X (CAAR X) (CDAR X)) (MAPC X (FUNCTION EDITSMASH1]) (EDIT.BI [LAMBDA (M N X) (* lmm "26-JUL-83 20:51") (PROG (A B) (OR N (SETQ N M)) [SETQ B (CDR (SETQ A (EDITNTH X N] (SETQ X (EDITNTH X M)) (COND ((AND A (TAILP A X)) (EDITSMASH A (CAR A)) (EDITSMASH X (CONS (CAR X) (CDR X)) B) (EDITSMASH1 (CAR X))) (T (ERROR!]) (EDIT.BO [LAMBDA (N X) (SETQ X (EDITNTH X N)) (COND ((NLISTP (CAR X)) (ERROR!))) (EDITSMASH X (CAAR X) (EDITNCONC (CDAR X) (CDR X))) (EDITSMASH1 (CAR X]) ) (RPAQ? EDITRDTBL (COPYREADTABLE "OLD-INTERLISP-T")) (ADDTOVAR USERMACROS [ED NIL (E (ED (COND ((LISTP (%##)) (CAR (%##))) (T (%##]) (ADDTOVAR EDITCOMSA ED) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY (BLOCK%: EDITBLOCK TTY/EDITL EDITL0 EDITL1 UNDOEDITL EDITCOM EDITCOMA EDITCOML EDITMAC EDITCOMS EDIT!UNDO UNDOEDITCOM UNDOEDITCOM1 EDITCOM1 EDITSMASH EDITSMASH1 EDITNCONC EDITAPPEND EDIT1F EDIT2F EDITNTH BPNT BPNT0 EDIT.RI EDIT.RO EDIT.LI EDIT.LO EDIT.BI EDIT.BO EDITDEFAULT EDITDEFAULT1 %## EDUP EDIT* EDOR EDRPT EDLOC EDLOCL EDIT%: EDITMBD EDITXTR EDITELT EDITCONT EDITSW EDITMV EDITTO EDITBELOW EDITRAN EDITSAVE EDITSAVE1 EDITH (ENTRIES TTY/EDITL EDITL0 %## UNDOEDITL BPNT0 EDITCONT EDLOCL) (SPECVARS L ATM COM LCFLG %#1 %#2 %#3 UNDOLST UNDOLST1 LASTAIL MARKLST UNFIND LASTP1 LASTP2 COMS EDITCHANGES EDITHIST0 LISPXID USERHANDLE) (RETFNS EDITL0 EDITL1) (BLKAPPLYFNS EDIT%: EDITMBD EDITMV EDITXTR EDITSW) (BLKLIBRARY NTH LAST MEMB NLEFT) (NOLINKFNS PRINTDEF EDITRACEFN EDITUSERFN) (LOCALFREEVARS FINDFLAG EDITHIST UNDOLST1 COM L L0 COM0 UNDOLST EDITLFLG ATM MARKLST EDITHIST0 UNFIND TYPEIN LCFLG LASTP1 LASTP2 LASTAIL COPYFLG ORIGFLG COMS TOFLG C LVL EDITCHANGES EDITLISPFLG) (GLOBALVARS EDITCALLS P.A.STATS EDITUNDOSTATS EDITUNDOSAVES SPELLSTATS1 P.A.STATS EDITUSERFN EDITIME DONTSAVEHISTORYCOMS COMPACTHISTORYCOMS EDITEVALSTATS MAXLOOP EDITCOMSL EDITCOMSA DWIMFLG CLISPTRANFLG EDITOPS HISTORYCOMS REREADFLG HISTSTR3 EDITRDTBL EDITHISTORY HISTSTR0 LISPXHISTORY LISPXBUFS EDITRACEFN EDITMACROS USERMACROS CLISPARRAY CHANGESARRAY COMMENTFLG **COMMENT**FLG EDITSMASHUSERFN)) (BLOCK%: EDITFINDBLOCK EDIT4E EDIT4E1 EDITQF EDIT4F EDITFPAT EDITFPAT1 EDIT4F1 EDIT4F2 EDIT4F3 EDITSMASH EDITSMASH1 EDITFINDP EDITBF EDITBF1 ESUBST (ENTRIES EDIT4E EDIT4E1 EDITQF EDIT4F EDITFPAT EDITFINDP EDITBF ESUBST) (LOCALFREEVARS C3 CHANGEFLG N TOPLVL FF NEWFLG FLG) (GLOBALVARS EDITUNDOSAVES CHCONLST2 EDITQUIETFLG CHCONLST1 MAXLEVEL UPFINDFLG CLISPTRANFLG CHANGESARRAY CLISPARRAY EDITHISTORY) (SPECVARS ATM L COM UNFIND LASTAIL UNDOLST1 EDITCHANGES)) (BLOCK%: NIL EDITFA TTY/EDITE (SPECVARS EDITCHANGES EDITFN)) ) (DECLARE%: DOEVAL@COMPILE DONTCOPY (GLOBALVARS FILELST DWIMFLG DWIMWAIT DWIMLOADFNSFLG) ) (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA %##) (ADDTOVAR NLAML EDITF2) (ADDTOVAR LAMA ) ) (PUTPROPS EDIT COPYRIGHT ("Venue & Xerox Corporation" T 1983 1984 1985 1986 1987 1990)) (DECLARE%: DONTCOPY (FILEMAP (NIL (4509 135740 (TTY/EDITE 4519 . 7734) (TTY/EDITL 7736 . 11709) (%## 11711 . 12364) (EDIT* 12366 . 13415) (EDIT%: 13417 . 15366) (EDITDEFAULT 15368 . 24108) (EDITDEFAULT1 24110 . 24434) (EDITH 24436 . 28940) (EDITRAN 28942 . 31622) (EDITTO 31624 . 33011) (EDITXTR 33013 . 34469) (EDLOC 34471 . 35760) (EDLOCL 35762 . 35962) (EDOR 35964 . 36383) (EDRPT 36385 . 37186) (EDUP 37188 . 38340) (ESUBST 38342 . 39159) (ESUBST1 39161 . 39852) (EDITFERROR 39854 . 40940) (EDITFA 40942 . 41393) (EDITELT 41395 . 41588) (UNSAVEBLOCK? 41590 . 43233) (EDITF1 43235 . 43436) (EDITF2 43438 . 44326) (EDITL0 44328 . 45852) (EDITL1 45854 . 49526) (EDITL2 49528 . 49865) (UNDOEDITL 49867 . 50687) (EDITCOM 50689 . 51809) (EDITCOMA 51811 . 63419) (EDITCOML 63421 . 76579) (EDITCONT 76581 . 77735) (EDITMAC 77737 . 78126) (EDITMBD 78128 . 78997) (EDITMV 78999 . 82395) (EDITCOMS 82397 . 82959) (EDIT!UNDO 82961 . 83850) (UNDOEDITCOM 83852 . 85653) (UNDOEDITCOM1 85655 . 86601) (EDITCOM1 86603 . 88708) (EDITSAVE 88710 . 90266) (EDITSAVE1 90268 . 91712) (EDITSMASH 91714 . 93801) (EDITSMASH1 93803 . 95310) (EDITSW 95312 . 95672) (EDITNCONC 95674 . 95960) (EDITAPPEND 95962 . 96317) (EDIT1F 96319 . 97340) (EDIT2F 97342 . 101382) (EDIT4E 101384 . 104074) (EDIT4E1 104076 . 106973) (EDITQF 106975 . 107591) (EDIT4F 107593 . 113731) (EDIT4F1 113733 . 118404) (EDIT4F2 118406 . 120080) (EDIT4F3 120082 . 121632) ( EDITFPAT 121634 . 123721) (EDITFPAT1 123723 . 125393) (EDITFINDP 125395 . 125815) (FEDITFINDP 125817 . 126115) (EDITBELOW 126117 . 127170) (EDITBF 127172 . 128529) (EDITBF1 128531 . 131009) (EDITNTH 131011 . 132317) (BPNT 132319 . 133173) (BPNT0 133175 . 133386) (EDIT.RI 133388 . 134253) (EDIT.RO 134255 . 134535) (EDIT.LI 134537 . 134768) (EDIT.LO 134770 . 134995) (EDIT.BI 134997 . 135501) ( EDIT.BO 135503 . 135738))))) STOP