XEROX WALKFILES 2 4 1 WALKFILES 1 4 Johannes A. G. M. Koomen (Koomen.wbst@xerox or Koomen@cs.rochester.edu) October 27, 1989 SUMMARY WALKFILES is a facility for searching loaded files for arbitrary objects. It complements MasterScope, in that it can do some things that MasterScope can't (like looking for arbitrary substrings in functions); other things Masterscope can do as well or better. WALKFILES does not require an analysis of the files prior to action. DESCRIPTION (WALKFILES pattern file{s} editcommands confirmflg quietflg filepackagetypes) [Function] Invokes WALKDEFS on all the objects on each file{s} of the types given in filepackagetypes. If file{s} is NIL, the value fo FILELST is used. If filepackagetypes is NIL, all the filepackage types in PRETTYTYPELST are used. (WALKDEFS pattern name{s} filepkgtype editcommands confirmflg quietflg) [Function] Walks over the filepkgtype definition of each name in name{s} looking for pattern. Pattern can be anything acceptable to EDITFINDP. For each occurrence, first prints the name (unless quietflg = T) and then prints the occurrence if editcommands is NIL, or invokes the editor in interactive mode if editcommands is T (asking for confirmation if confirmflg = T) , or applies editcommands to the name and filepkgtype if editcommands is a function, or otherwise invokes the editor with editcommands. EXAMPLES (WALKFILES 'elseif 'MYFILE T) [Example] Brings up the editor on every definition in MYFILE which contains the symbol elseif. (WALKFILES '$FOO$) [Example] Prints every occurence of any symbols with FOO as a substring in every definition in any file in FILELST. (LET (THEFNS) [Example] (WALKFILES '(*ANY* $FOO$ BAR) NIL '(LAMBDA (FN) (PUSH THEFNS FN)) NIL T 'FNS) THEFNS) Collects all functions containing either the symbol BAR or any symbols with FOO as a substring on every file in FILELST. (LIST ((PAGE NIL (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))4È 6`È(È1È È1È ¼È(ŠŠ8(È (ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD HELVETICA MODERN MODERN MODERN MODERNMODERN LOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN HN  = ,+@ 7   h $ 6 "    5    V kqz}kzº