home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / guile / 1.8 / lang / elisp / internals / trace.scm < prev   
Encoding:
Text File  |  2008-12-17  |  481 b   |  29 lines

  1. (define-module (lang elisp internals trace)
  2.   #:export (trc trc-syms trc-all trc-none))
  3.  
  4. (define *syms* #f)
  5.  
  6. (define (trc-syms . syms)
  7.   (set! *syms* syms))
  8.  
  9. (define (trc-all)
  10.   (set! *syms* #f))
  11.  
  12. (define (trc-none)
  13.   (set! *syms* '()))
  14.  
  15. (define (trc . args)
  16.   (let ((sym (car args))
  17.     (args (cdr args)))
  18.     (if (or (and *syms*
  19.          (memq sym *syms*))
  20.         (not *syms*))
  21.     (begin
  22.       (write sym)
  23.       (display ": ")
  24.       (write args)
  25.       (newline)))))
  26.  
  27. ;; Default to no tracing.
  28. (trc-none)
  29.