Subject: Re: Redefinition of print-object

From: haible (Bruno Haible)
Date: Sat, 16 Jul 94 14:23:32 +0200

>    WARNING:
>    The generic function #<GENERIC-FUNCTION PRINT-OBJECT> is being modified, but has already been called.

> I would like to know if this might be a problem with my installation.

Not at all. The function PRINT-OBJECT is called when lispinit.mem is
built (on objects of type CONDITION), and the info that it has been called
is remembered in lispinit.mem.

I am a bit unhappy about this warning because PRINT-OBJECT is meant to
be extended even after having been called, but I don't see in which
respect PRINT-OBJECT is special among all generic functions.

Bruno

---

From: Joachim Schrod <[email-masked]>
Date: Mon, 18 Jul 1994 20:21:52 +0100 (MESZ)

> respect PRINT-OBJECT is special among all generic functions.

It seems to be my turn for the weekly enhancement wish... :-) :-)

The background: It concerns CLOS language extensions or installation
of applications. In both cases the user works with a virtual platform
that should be `clean' for him. I get mails from users that want to
install an application and ask now if something went wrong. (Yes,
they're no Lisp programmers -- real (l)users...)
    Of course, the quick fix is to add this to the documentation. But
then, who reads documentation? And so I would like to get rid of this
superfluous warning.

How about:

 (a) An additional argument to #'saveinitmem that tells CLISP that all
     definitions are clean (i.e., not used).
	That can be used if this memory image shall be a virtual
     machine where the user shall not see its internal structure. The
     default of this argument is nil.

or

 (b) some global variable (in package system?) that controls the
     output of such warnings. (And that I can turn off in my
     installation scripts.)

or

 (c) Some way to tell #'load that it shall not issue such a warning.
     Perhaps via the value of verbose? Or an additional keyword parameter?

I must say, I like (a) since it matches exactly my usage of Lisp. (c)
is IMO problematic since it's outside dpANS (is it?).

Comments, anybody?

	Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Joachim Schrod			Email: [email-masked]
Computer Science Department
Technical University of Darmstadt, Germany

---

From: Andrew Philpot <[email-masked]>
Date: Mon, 18 Jul 94 12:02:06 PDT

I don't really have a dog in this fight (I've only started using CLISP
and only on my home PC -- the user of that machine is very tolerant of
warning messages), but it seems to me that if the warning generated
could be gotten rid of using a suitable combination of MUFFLE-WARNING,
HANDLER-BIND, and the like.  Wrapping this around an application's use
of LOAD/REQUIRE couldn't be that tough.  I realize that this would
likely muffle all warnings, including "important" ones.  Maybe the
warning generated could be of a particular type, rather than
SIMPLE-WARNING (as it is in clisp version at hand -- 10/12/93) and
then the muffler could be a little more discriminating.  A warning of
type CLOS:MODIFIED-GENERIC-FUNCTION or some such would at least be
clear.

Andrew