(FILECREATED " 3-Aug-88 15:38:46" {ERINYES}<LISPUSERS>KOTO>LISPNERD.;1 8148 changes to: (VARS LISPNERDCOMS) previous date: "18-Nov-87 14:37:21" {QV}<DICT>TOOLS>LISPNERD.;6) (* Copyright (c) 1987, 1988 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT LISPNERDCOMS) (RPAQQ LISPNERDCOMS ((COMS * LISPNERDDEPENDENCIES) (* must come before any FILES) (FILES ANALYZER DINFO (FROM {QV}<DICTSERVER>LISP>) DICTCLIENT) (FNS LISPNERD.INIT IRMNERD.PRINTSEARCH) (INITVARS IRMDICT IRMNERD.LASTSEARCH IRMNERD.LASTREQUEST (IRMNERD.MAXWORDS 50)) (GLOBALVARS IRMDICT IRMNERD.LASTSEARCH IRMNERD.LASTREQUEST IRMNERD.MAXWORDS) (FNS IRMDICT.PRINTENTRY) (P (LISPNERD.INIT)))) (RPAQQ LISPNERDDEPENDENCIES [(* * code to make sure that the right versions of everything are loaded. The P must be executed before any FILES commands.) [E (PUTPROP (QUOTE LISPNERD) (QUOTE DEPENDENCIES) (for FILE in (FILECOMSLST (QUOTE LISPNERD) (QUOTE FILES)) collect (CONS FILE (CAAR (GETPROP FILE (QUOTE FILEDATES] (PROP DEPENDENCIES LISPNERD) (P (for FILE FILEDATE in (GETPROP (QUOTE LISPNERD) (QUOTE DEPENDENCIES)) do [SETQ FILEDATE (CAAR (GETPROP (CAR FILE) (QUOTE FILEDATES] (COND ([AND FILEDATE (CDR FILE) (ILESSP (IDATE FILEDATE) (IDATE (CDR FILE] (* clear FILEDATES to force FILESLOAD to reload the file.) (PUTPROP (CAR FILE) (QUOTE FILEDATES) NIL]) (* * code to make sure that the right versions of everything are loaded. The P must be executed before any FILES commands.) (PUTPROPS LISPNERD DEPENDENCIES ((ANALYZER . " 3-Jun-88 17:03:38") (DINFO . " 8-Jan-86 21:51:52") (DICTCLIENT . "15-Dec-87 09:49:00"))) [for FILE FILEDATE in (GETPROP (QUOTE LISPNERD) (QUOTE DEPENDENCIES)) do [SETQ FILEDATE (CAAR (GETPROP (CAR FILE) (QUOTE FILEDATES] (COND ([AND FILEDATE (CDR FILE) (ILESSP (IDATE FILEDATE) (IDATE (CDR FILE] (* clear FILEDATES to force FILESLOAD to reload the file.) (PUTPROP (CAR FILE) (QUOTE FILEDATES) NIL] (* must come before any FILES) (FILESLOAD ANALYZER DINFO (FROM {QV}<DICTSERVER>LISP>) DICTCLIENT) (DEFINEQ (LISPNERD.INIT [LAMBDA NIL (* jtm: "18-Nov-87 14:36") (COND ((NULL IRMDICT) [Dict.Establish (SETQ IRMDICT (create Dict dictName ←(QUOTE IRMDict) printEntryFn ←(FUNCTION IRMDICT.PRINTENTRY] (PUTASSOC (QUOTE Search% IRM) (QUOTE ((IRMNERD.PRINTSEARCH) "Searches the Interlisp Reference Manual for entries given a list of keywords.")) BackgroundMenuCommands) (SETQ BackgroundMenu NIL]) (IRMNERD.PRINTSEARCH [LAMBDA (SYNONYMCLASSES) (* jtm: " 7-Apr-87 12:33") (PROG (VENNDIAGRAM SELECTION MENUITEMS (MINWORD 0) (MAXWORD IRMNERD.MAXWORDS)) [COND ((NULL SYNONYMCLASSES) (CLRPROMPT) (PROMPTPRINT (CHARACTER (CHARCODE CR))) (SETQ SYNONYMCLASSES (PROMPTFORWORD "keywords to search on:" IRMNERD.LASTREQUEST NIL PROMPTWINDOW NIL NIL (CHARCODE EOL ESCAPE LF))) (COND ((NULL SYNONYMCLASSES) (PROMPTPRINT "Aborted") (RETURN)) (T (CLRPROMPT))) (COND ((NOT (STREQUAL SYNONYMCLASSES IRMNERD.LASTREQUEST)) (SETQ IRMNERD.LASTREQUEST SYNONYMCLASSES) (SETQ IRMNERD.LASTSEARCH NIL] [do [SETQ VENNDIAGRAM (COND ((AND IRMNERD.LASTSEARCH (EQ MINWORD 0)) IRMNERD.LASTSEARCH) (T (PROMPTPRINT " Searching . . . ") (DICTCLIENT.SEARCHFORWORD SYNONYMCLASSES 2 MINWORD MAXWORD (QUOTE IRMNerd] (COND ((EQ MINWORD 0) (* cache the results in case the use calls again.) (SETQ IRMNERD.LASTSEARCH VENNDIAGRAM))) [COND ((NULL VENNDIAGRAM) (PROMPTPRINT "Sorry, no results.") (FLASHWINDOW PROMPTWINDOW) (RETURN)) ((NULL (CDR VENNDIAGRAM)) (SETQ MENUITEMS (CADAR VENNDIAGRAM))) (T (SETQ MENUITEMS (for SET in VENNDIAGRAM collect (LIST [CONCATLIST (for ELEMENT on (CAR SET) collect (COND ((CDR ELEMENT) (CONCAT (CAR ELEMENT) " ")) (T (CAR ELEMENT] (LIST (QUOTE QUOTE) (CAR SET)) NIL (CONS (QUOTE SUBITEMS) (CADR SET] (CLRPROMPT) (SETQ SELECTION (MENU (create MENU TITLE ← "IRM Entries" ITEMS ← MENUITEMS CENTERFLG ← T))) (COND ((NULL SELECTION) (PROMPTPRINT " No selection made.") (RETURN)) ((LISTP SELECTION) [for TAIL CLASSNAME on SELECTION do (COND ((EQ (NTHCHARCODE (CAR TAIL) -1) (CHARCODE +)) (SETQ CLASSNAME (SUBSTRING (CAR TAIL) 1 -2)) (RPLACA TAIL (for CLASS in SYNONYMCLASSES thereis (STREQUAL (CAR CLASS) CLASSNAME] (SETQ SYNONYMCLASSES SELECTION) (PROMPTPRINT "Seaching for: " SYNONYMCLASSES) (SETQ MINWORD 0) (SETQ MAXWORD IRMNERD.MAXWORDS)) ((AND (EQ 1 (STRPOS ". . .+" SELECTION)) (STRPOS "more" SELECTION)) (* the user asked for the next chunk.) (SETQ MINWORD (ADD1 MAXWORD)) (SETQ MAXWORD (IPLUS MAXWORD IRMNERD.MAXWORDS))) ((EQ 1 (STRPOS "No more" SELECTION)) (RETURN)) (T (PROMPTPRINT " Fetching definition . . . ") (IRMDICT.PRINTENTRY NIL SELECTION) (CLRPROMPT) (RETURN] (RETURN T]) ) (RPAQ? IRMDICT NIL) (RPAQ? IRMNERD.LASTSEARCH NIL) (RPAQ? IRMNERD.LASTREQUEST NIL) (RPAQ? IRMNERD.MAXWORDS 50) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS IRMDICT IRMNERD.LASTSEARCH IRMNERD.LASTREQUEST IRMNERD.MAXWORDS) ) (DEFINEQ (IRMDICT.PRINTENTRY [LAMBDA (DICT LEMMA) (* jtm: " 2-Apr-87 08:12") (LET (FIRSTCHAR SECTION# GRAPH NODE) (SETQ FIRSTCHAR (NTHCHAR LEMMA 1)) [COND ((NUMBERP FIRSTCHAR) [SETQ SECTION# (SUBSTRING LEMMA 1 (SUB1 (OR (STRPOS " " LEMMA) 0] [COND ((EQ (NTHCHARCODE SECTION# -1) (CHARCODE %.)) (* sometimes there is a trailing period.) (SETQ SECTION# (SUBSTRING SECTION# 1 -2] [for I from 1 to (NCHARS SECTION#) do (COND ((EQ (NTHCHARCODE SECTION# I) (CHARCODE %.)) (* DINFO uses dashes instead of periods) (RPLCHARCODE SECTION# I (CHARCODE -] (SETQ SECTION# (MKATOM SECTION#)) (SETQ GRAPH (GETWINDOWUSERPROP DINFOW (QUOTE CURRENT.GRAPH))) [COND ((NULL GRAPH) (DINFO.INIT) (SETQ GRAPH (GETWINDOWUSERPROP DINFOW (QUOTE CURRENT.GRAPH] (SETQ NODE (FASSOC SECTION# (fetch (DINFOGRAPH NODELST) of GRAPH))) (AND NODE (DINFO.UPDATE NODE))) (T (DINFO.IRM.LOOKUP (SUBSTRING LEMMA (COND ((EQ FIRSTCHAR (QUOTE %()) 2) (T 1)) (SUB1 (OR (STRPOS " " LEMMA) 0] T]) ) (LISPNERD.INIT) (PUTPROPS LISPNERD COPYRIGHT ("Xerox Corporation" 1987 1988)) (DECLARE: DONTCOPY (FILEMAP (NIL (2416 6288 (LISPNERD.INIT 2426 . 2972) (IRMNERD.PRINTSEARCH 2974 . 6286)) (6534 8048 ( IRMDICT.PRINTENTRY 6544 . 8046))))) STOP