(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "XCL-USER") (IL:FILECREATED " 8-Sep-94 20:21:45" ("compiled on " IL:|{DSK}lispusers>DEBUGGER-CONTEXT.;1| ) "28-Jul-94 17:28:46" IL:|bcompl'd| IL:|in| "Medley 25-Aug-94 ..." IL:|dated| "25-Aug-94 10:02:49") (IL:FILECREATED "14-Aug-87 17:09:50" IL:{QV}CONVERT>DEBUGGER-CONTEXT.\;2 IL:|changes| IL:|to:| (IL:COMMANDS "unlex") (IL:FUNCTIONS OPEN-LEX-ENV INIT-DEBUGGER-CONTEXT LEX-EVAL-INPUT) (IL:VARS IL:DEBUGGER-CONTEXTCOMS) IL:|previous| IL:|date:| "10-Aug-87 13:19:47" IL:{QV}TOOLS>LEX-TOOL.\;1) (IL:PRETTYCOMPRINT IL:DEBUGGER-CONTEXTCOMS) (IL:RPAQQ IL:DEBUGGER-CONTEXTCOMS ((IL:* IL:|;;;| "Debugger-Context -- fix the Xerox Lisp debugger so that you can work with lexically-defined functions, variables, blocks, and tag-bodies sensibly." ) (IL:* IL:|;;;| "Written out of frustration by Herb Jellinek, 13-Aug-87.") (IL:FUNCTIONS INIT-DEBUGGER-CONTEXT LEX-DO-EVENT OPEN-LEX-ENV) (IL:VARIABLES XCL::*ENVIRONMENT*) (IL:P ( INIT-DEBUGGER-CONTEXT)) (IL:COMMANDS "lex" "unlex") (IL:PROP IL:MAKEFILE-ENVIRONMENT IL:DEBUGGER-CONTEXT ))) (DEFUN INIT-DEBUGGER-CONTEXT NIL "Set things up for the DEBUGGER-CONTEXT hack" (UNDOABLY (SETF *PER-EXEC-VARIABLES* (IL:* IL:\; "cause *environment* to be bound to nil in each executive.") (ACONS ( QUOTE XCL::*ENVIRONMENT*) NIL *PER-EXEC-VARIABLES*)) (IL:* IL:\; "\"advise\" do-event to look at *environment* for its env.") (UNLESS (FBOUNDP (QUOTE OLD-DO-EVENT)) ( SETF (SYMBOL-FUNCTION (QUOTE OLD-DO-EVENT)) (SYMBOL-FUNCTION (QUOTE IL:DO-EVENT))) (SETF ( SYMBOL-FUNCTION (QUOTE IL:DO-EVENT)) (SYMBOL-FUNCTION (QUOTE LEX-DO-EVENT)))))) (DEFUN LEX-DO-EVENT (ORIGINAL-INPUT ENV &OPTIONAL (FN NIL FUNCTION-P)) "Replacement for the executive's old DO-EVENT function." (IF FUNCTION-P (OLD-DO-EVENT ORIGINAL-INPUT ( OR ENV XCL::*ENVIRONMENT*) FN) (OLD-DO-EVENT ORIGINAL-INPUT (OR ENV XCL::*ENVIRONMENT*)))) (DEFUN OPEN-LEX-ENV NIL "Finds the 'current' lex env and makes this debugger instance use it" (LET (( FRAME-VARS (IL:STKARGS IL:LASTPOS))) (DECLARE (SPECIAL IL:LASTPOS)) (DOLIST (VALUE FRAME-VARS (FORMAT T ";; ? found no lexical environment")) (IF (IL:ENVIRONMENT-P VALUE) (PROGN (SETQ XCL::*ENVIRONMENT* VALUE) (FORMAT T ";; set lexical environment") (RETURN)))))) (DEFVAR XCL::*ENVIRONMENT* NIL) (INIT-DEBUGGER-CONTEXT) (DEFCOMMAND ("lex" :DEBUGGER) NIL "Sets the debugger's lexical environment to that of the selected frame" (OPEN-LEX-ENV) (IL:* IL:\; "") (VALUES)) (DEFCOMMAND ("unlex" :DEBUGGER) NIL "Unsets the lexical environment in the debugger" (SETQ XCL::*ENVIRONMENT* NIL) (FORMAT T ";; unset lexical environment") (VALUES)) (IL:PUTPROPS IL:DEBUGGER-CONTEXT IL:MAKEFILE-ENVIRONMENT (:READTABLE "XCL" :PACKAGE "XCL-USER")) (IL:PUTPROPS IL:DEBUGGER-CONTEXT IL:COPYRIGHT ("Xerox Corporation" 1987)) NIL