home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_100
/
176_01
/
trace.lsp
< prev
next >
Wrap
Text File
|
1986-01-06
|
676b
|
21 lines
(setq *tracelist* nil)
(defun evalhookfcn (expr env &aux val)
(if (and (consp expr) (member (car expr) *tracelist*))
(progn (princ ">>> ") (print expr)
(setq val (evalhook expr evalhookfcn nil env))
(princ "<<< ") (print val))
(evalhook expr evalhookfcn nil env)))
(defun trace (fun)
(if (not (member fun *tracelist*))
(progn (setq *tracelist* (cons fun *tracelist*))
(setq *evalhook* evalhookfcn)))
*tracelist*)
(defun untrace (fun)
(if (null (setq *tracelist* (delete fun *tracelist*)))
(setq *evalhook* nil))
*tracelist*)