(FILECREATED "19-Mar-86 23:25:10" {PHYLUM}<SHRAGER>LISP>WDWHACKS.;3 5492 changes to: (VARS WDWHACKSCOMS) (FNS SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW) previous date: "18-Mar-86 18:21:56" {PHYLUM}<SHRAGER>LISP>WDWHACKS.;1) (PRETTYCOMPRINT WDWHACKSCOMS) (RPAQQ WDWHACKSCOMS [(FNS CLOSE.WINDOWS.IN.REGION SHAPEW.AND.SAVE SHAPEW.POP SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW Inspecticide) (DECLARE: DONTEVAL@LOAD DOCOPY (P (RPLACA (CDR (ASSOC (QUOTE Shape) WindowMenuCommands)) (QUOTE (QUOTE SHAPEW.AND.SAVE))) [RPLACD (CDDR (ASSOC (QUOTE Shape) WindowMenuCommands)) (COPY (QUOTE ((SUBITEMS ("PopShape" (QUOTE SHAPEW.POP) "Return a reshaped window to its original form." ] (SETQ WindowMenu NIL) (SETQ BackgroundMenuCommands (CONS [COPY (QUOTE ("SlamWs" (QUOTE (CLOSE.WINDOWS.IN.REGION)) "Close all the windows in a region of the screen." (SUBITEMS ("Inspectors" (QUOTE (Inspecticide)) "Close only inspector windows."] BackgroundMenuCommands)) (SETQ BackgroundMenu NIL) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW]) (DEFINEQ (CLOSE.WINDOWS.IN.REGION [LAMBDA (R) (* edited: "12-May-85 22:27") (OR R (SETQ R (GETREGION))) (for W in (OPENWINDOWS) do (COND ((INTERSECTREGIONS R (WINDOWPROP W (QUOTE REGION))) (CLOSEW W]) (SHAPEW.AND.SAVE [LAMBDA (WINDOW NEWREGION) (* Jeff.Shrager "18-Mar-86 18:01") (WINDOWPROP WINDOW (QUOTE OLD.SHAPE) (WINDOWREGION WINDOW)) (SHAPEW WINDOW NEWREGION]) (SHAPEW.POP [LAMBDA (WINDOW) (* Jeff.Shrager "18-Mar-86 18:01") (COND ((WINDOWPROP WINDOW (QUOTE OLD.SHAPE)) (SHAPEW WINDOW (WINDOWPROP WINDOW (QUOTE OLD.SHAPE) (WINDOWREGION WINDOW]) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW [LAMBDA NIL (* Jeff.Shrager "18-Mar-86 18:48") (* * This is the universe's worst known hack. Whoever wrote ATTACHEDWINDOW put hard constants into the ATTACHWINDOW fn which get inserted into the PASSTOMAINCOMS prop of attached windows. This should be a var so that we can tell it what messages to pass or not in a general case. This function creates an attached window and (you'll love this) smashes the prop's value so that the const in the ATTACHWINDOW function is smashed so that everything works pretty generally. Yuko!!!) (LET ([TEMPWINDOW (CREATEW (QUOTE (0 0 10 10] MAINWINDOW) (ATTACHWINDOW TEMPWINDOW [SETQ MAINWINDOW (CREATEW (QUOTE (0 0 10 10] (QUOTE TOP)) [RPLACD (WINDOWPROP TEMPWINDOW (QUOTE PASSTOMAINCOMS)) (APPEND (COPY (QUOTE (SHAPEW.POP SHAPEW.AND.SAVE))) (CDR (WINDOWPROP TEMPWINDOW (QUOTE PASSTOMAINCOMS] (CLOSEW TEMPWINDOW) (CLOSEW MAINWINDOW]) (Inspecticide [LAMBDA NIL (* edited: "13-Sep-85 18:35") (for w in (OPENWINDOWS) when [AND (EQ (QUOTE INSPECTW.REPAINTFN) (WINDOWPROP w (QUOTE REPAINTFN))) (STRPOS "Inspector" (WINDOWPROP w (QUOTE TITLE] do (CLOSEW w]) ) (DECLARE: DONTEVAL@LOAD DOCOPY (RPLACA (CDR (ASSOC (QUOTE Shape) WindowMenuCommands)) (QUOTE (QUOTE SHAPEW.AND.SAVE))) [RPLACD (CDDR (ASSOC (QUOTE Shape) WindowMenuCommands)) (COPY (QUOTE ((SUBITEMS ("PopShape" (QUOTE SHAPEW.POP) "Return a reshaped window to its original form."] (SETQ WindowMenu NIL) (SETQ BackgroundMenuCommands (CONS [COPY (QUOTE ("SlamWs" (QUOTE (CLOSE.WINDOWS.IN.REGION)) "Close all the windows in a region of the screen." (SUBITEMS ("Inspectors" (QUOTE (Inspecticide)) "Close only inspector windows." ] BackgroundMenuCommands)) (SETQ BackgroundMenu NIL) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW) ) (PUTPROPS WDWHACKS COPYRIGHT (NONE)) (DECLARE: DONTCOPY (FILEMAP (NIL (1702 4307 (CLOSE.WINDOWS.IN.REGION 1712 . 2028) (SHAPEW.AND.SAVE 2030 . 2328) ( SHAPEW.POP 2330 . 2686) (SMASH.THE.DAMNED.CONST.IN.ATTACHWINDOW 2688 . 3945) (Inspecticide 3947 . 4305 ))))) STOP