home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / lisp / mcl / 1983 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.4 KB

  1. Path: sparky!uunet!olivea!apple!cambridge.apple.com!cfry@MIT.EDU
  2. From: cfry@MIT.EDU (Christopher Fry)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: print-db & *error-output*
  5. Message-ID: <9301120018.AA12912@MIT.EDU>
  6. Date: 12 Jan 93 00:04:07 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 23
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11. Print-db prints to *error-output* which automatically causes the
  12. listener to become the front window before it prints into it.
  13.  
  14. Especially when debugging window system code using print-db you want the
  15. current front window to remain the front window throughout the 
  16. print-db call. Semanitically I think of print-db more 
  17. like a user-injected trace, rather than a program error.
  18. Trace-output does not pop the listener to the front.
  19.  
  20. One way around these problems is to define your own macro:
  21.  
  22. (defmacro print-db-fry (&rest args)
  23.   `(let ((*error-output* *trace-output*))
  24.      (print-db ,@args)))
  25.  
  26. but I propose the MCL print-db be changed to use *trace-output* in place
  27. of *error-output*. The most flexibile would be to have it use
  28. *print-db-output* stream and let the hacker set it to what they want.
  29. I'd vote for the default being *trace-output*, though this extra hair
  30. is unnecessary for most uses I can think of at the moment.
  31.  
  32. I'm guilty of introducing this function to CCL so, if it hasn't been changed
  33. since then, I guess I'm to blame for the current behavior.
  34.