(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "INTERLISP")
(FILECREATED "27-Jul-90 07:37:36" |{DSK}<usr>local>lde>loops>src>SYSTEM>INSPECT-PATCH.;2| 2859   

      |changes| |to:|  (VARS INSPECT-PATCHCOMS)

      |previous| |date:| "14-Jun-88 16:11:55" |{DSK}<usr>local>lde>loops>src>SYSTEM>INSPECT-PATCH.;1|
)


; Copyright (c) 1988, 1990 by Venue & Xerox Corporation.  All rights reserved.

(PRETTYCOMPRINT INSPECT-PATCHCOMS)

(RPAQQ INSPECT-PATCHCOMS ((FNS INSPECT/AS/FUNCTION)))
(DEFINEQ

(inspect/as/function
  (lambda (atm stkp window)                                  (* \; "Edited 14-Jun-88 16:11 by raf")
          
          (* |;;| "calls an editor on function ATM.  STKP and WINDOW are the stack pointer and window of the break in which this inspect command was called")

    (let ((editor (select.fns.editor atm))
          frame codebase proc)
         (and editor
              (|if| (eq editor 'inspectcode)
                    |then|
                    (cond
                       ((and (stackp stkp)
                             (not (|fetch| (fx invalidp)
                                         |of|
                                         (setq frame (|fetch| (stackp edfxp)
                                                            |of| stkp)))))
                        (inspectcode (cond
                                        ((eq (\\get-compiled-code-base atm)
                                             (setq codebase (|fetch| (fx fnheader)
                                                                   |of| frame)))
                                         atm)
                                        (t 
          
          (* |;;| "Function executing in this frame is not the one in the definition cell of its name, so fetch the real code.  Have to pass a CCODEP")

                                           (make-compiled-closure codebase)))
                               nil nil nil (|fetch| (fx pc)
                                                  |of| frame)))
                       (t (inspectcode atm)))
                    |else|
                    (let ((proc (and window (windowprop window 'process)))
                          (editorargs (|if| (eq editor 'ed)
                                            |then|
                                            (list atm '(method-fns functions fns \:dontwait \:display
                                                              ))
                                            |else|
                                            (list atm))))
                         (|if| proc |then| (process.apply proc editor editorargs)
                               |else|
                               (cl:apply editor editorargs))))))))
)
(PUTPROPS INSPECT-PATCH COPYRIGHT ("Venue & Xerox Corporation" 1988 1990))
(DECLARE\: DONTCOPY
  (FILEMAP (NIL (487 2761 (INSPECT/AS/FUNCTION 497 . 2759)))))
STOP
