[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: PRINT-PRETTY-HOOK (version 1)
- To: Dan L. Pierson <pierson%mist@MULTIMAX.ARPA>
- Subject: Re: Issue: PRINT-PRETTY-HOOK (version 1)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Thu, 6 Oct 88 15:55 EDT
- Cc: cl-cleanup@sail.stanford.edu
- In-reply-to: <8810041357.AA26956@mist.UUCP>
Date: Tue, 04 Oct 88 09:57:34 EDT
From: Dan L. Pierson <pierson%mist@multimax.ARPA>
I don't think you answered my question. Do you want to change the
effect of -all- calls to WRITE, PRINT, FORMAT ~S, etc.? Or do you
want to only change the printing by interactive tools (you mentioned
the read-eval-print loop, the debugger, and trace)?
Sorry, I want to change the effect of -all- calls. The only reason
that I harp on the interactive tools is that they are frequently the
hardest to change. If my own code wants to avoid the this feature I
can easily disable it locally.
Okay.
It sounds to me like what you want is a function you can redefine
(or equivalently a variable you can SETQ to a function) together
with a specification of in what situations the function will be
called.
Right, though dynamic binding would be more convenient than setting in
some cases such as local disabling.
You can get the effect of dynamic binding by globally redefining it to a
function that looks at a dynamically bound variable that tells it what to do.
Once that's clear a name can be chosen. Possibly the
feature already exists in the language, via a :AROUND method
on PRINT-OBJECT with no specialized parameters, depending on whether
what that does is precisely what you wanted.
Does it do what I want (I'm not yet a CLOS theologian)?
Yes.
I think this means we can withdraw the PRINT-PRETTY-HOOK proposal, since
Common Lisp as amended by CLOS already will do what you want.