Add hook for external inspector
authorKevin Rosenberg <kevin@rosenberg.net>
Sat, 5 Apr 2003 20:49:44 +0000 (20:49 +0000)
committerKevin Rosenberg <kevin@rosenberg.net>
Sat, 5 Apr 2003 20:49:44 +0000 (20:49 +0000)
src/code/inspect.lisp

index f143295..ed2b175 100644 (file)
 ;;; indicates that that a slot is unbound.
 (defvar *inspect-unbound-object-marker* (gensym "INSPECT-UNBOUND-OBJECT-"))
 
-(defun inspect (object)
+(defun inspector (object input-stream output-stream)
+  (declare (ignore input-stream))
   (catch 'quit-inspect
-    (%inspect object *standard-output*))
+    (%inspect object output-stream))
   (values))
 
+(defvar *inspect-fun* #'inspector
+  "a function of three arguments OBJECT, INPUT, and OUTPUT which starts an interactive inspector.")
+
 (defvar *inspected*)
 (setf (documentation '*inspected* 'variable)
       "the value currently being inspected in CL:INSPECT")
 
+(defun inspect (object)
+  (funcall *inspect-fun* object *standard-input* *standard-output*))
+
 (defvar *help-for-inspect*
   "
 help for INSPECT: