mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-17 23:02:31 -08:00
ECL implements EXT:*INSPECTOR-HOOK*
This commit is contained in:
parent
0abfe4a7e9
commit
b268cc89bd
4 changed files with 31 additions and 15 deletions
|
|
@ -201,6 +201,9 @@ ECL 11.1.2
|
|||
SI:GC-STATS. This made nested TIME calls not to work, as the statistics of
|
||||
the inner call would spoil those of the outer one. This has been fixed.
|
||||
|
||||
- ECL implements CDR 6 (ext:*inspector-hook*) as described in
|
||||
http://cdr.eurolisp.org/document/6/index.html
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
;;; fill-column:79 ***
|
||||
|
|
|
|||
|
|
@ -2043,5 +2043,7 @@ cl_symbols[] = {
|
|||
|
||||
{SYS_ "FUNCTION-BOUNDARY", SI_ORDINARY, NULL, -1, OBJNULL},
|
||||
|
||||
{EXT_ "*INSPECTOR-HOOK*", EXT_SPECIAL, NULL, -1, Cnil},
|
||||
|
||||
/* Tag for end of list */
|
||||
{NULL, CL_ORDINARY, NULL, -1, OBJNULL}};
|
||||
|
|
|
|||
|
|
@ -2043,5 +2043,7 @@ cl_symbols[] = {
|
|||
|
||||
{SYS_ "FUNCTION-BOUNDARY",NULL},
|
||||
|
||||
{EXT_ "*INSPECTOR-HOOK*",NULL},
|
||||
|
||||
/* Tag for end of list */
|
||||
{NULL,NULL}};
|
||||
|
|
|
|||
|
|
@ -446,25 +446,34 @@ q (or Q): quits the inspection.~%~
|
|||
((sys:instancep object) (inspect-instance object))
|
||||
(t (format t "~S - ~S" object (type-of object))))))
|
||||
|
||||
|
||||
(defun inspect (object &aux (*inspect-mode* t)
|
||||
(*inspect-level* 0)
|
||||
(*inspect-history* nil)
|
||||
(*old-print-level* *print-level*)
|
||||
(*old-print-length* *print-length*)
|
||||
(*print-level* 3)
|
||||
(*print-length* 3))
|
||||
(defun default-inspector (object)
|
||||
"Args: (object)
|
||||
Shows the information about OBJECT interactively. See the ECL Report for the
|
||||
inspect commands, or type '?' to the inspector."
|
||||
(declare (si::c-local))
|
||||
;;(read-line)
|
||||
(terpri)
|
||||
(princ "Inspection mode: Type ? followed by #\\Newline for help.")
|
||||
(terpri)
|
||||
(terpri)
|
||||
(catch 'QUIT-INSPECT (inspect-object object))
|
||||
(terpri)
|
||||
(values))
|
||||
(let ((*inspect-mode* t)
|
||||
(*inspect-level* 0)
|
||||
(*inspect-history* nil)
|
||||
(*old-print-level* *print-level*)
|
||||
(*old-print-length* *print-length*)
|
||||
(*print-level* 3)
|
||||
(*print-length* 3))
|
||||
(terpri)
|
||||
(princ "Inspection mode: Type ? followed by #\\Newline for help.")
|
||||
(terpri)
|
||||
(terpri)
|
||||
(catch 'QUIT-INSPECT (inspect-object object))
|
||||
(terpri)
|
||||
(values)))
|
||||
|
||||
(defun inspect (object)
|
||||
(print 'hola)
|
||||
(print ext:*inspector-hook*)
|
||||
(if ext:*inspector-hook*
|
||||
(funcall *inspector-hook* object)
|
||||
(default-inspector object))
|
||||
object)
|
||||
|
||||
(defun describe (object &optional (stream *standard-output*)
|
||||
&aux (*inspect-mode* nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue