From: Mikalai
Subject: How to turn off some CLOS warnings in CLISP?
Date: 
Message-ID: <1138325420.839629.45860@f14g2000cwb.googlegroups.com>
Hi to everyone.

Do you know if it is possible to turn off CLOS's warning in CLISP in
the following situation:

[1]> (defmethod foo ((a integer)) "Integer")
#<STANDARD-METHOD (#<BUILT-IN-CLASS INTEGER>)>
[2]> (foo 1)
"Integer"
[3]> (defmethod foo ((a float)) "Float")

WARNING:
The generic function #<GENERIC-FUNCTION FOO> is being modified, but has
already been called.
#<STANDARD-METHOD (#<BUILT-IN-CLASS FLOAT>)>
[4]>

Is it possible to turn off this warning of modifying a generic function
after it has been used?
Thanks in advance.
From: Joerg Hoehle
Subject: Re: How to turn off some CLOS warnings in CLISP?
Date: 
Message-ID: <ur76mowb1.fsf@users.sourceforge.net>
"Mikalai" <········@yahoo.com> writes:
> Do you know if it is possible to turn off CLOS's warning in CLISP in
> the following situation:

> [2]> (foo 1)
> "Integer"
> [3]> (defmethod foo ((a float)) "Float")
> WARNING:
> The generic function #<GENERIC-FUNCTION FOO> is being modified, but has
> already been called.
> #<STANDARD-METHOD (#<BUILT-IN-CLASS FLOAT>)>
> [4]>

IMHO it depends on your needs. Are you using the REPL? Considering
replacing code in a running Web-server?  Want to see less "noise"?

o Please lookup MUFFLE-WARNING in the Common Lisp standard or Hyperspec (CLHS)

o If that fails, here's what Sam Steingold answered on 2006-01-17 in
clisp-lisp to another poster:

>I don't think I can give you an outright answer, but here are some
>general hints:
>
>1. start with the CLISP FAQ list http://clisp.cons.org/impnotes/faq.html
>
>2. take a look at http://clisp.cons.org/impnotes/clisp.html#bugs
>
>and a specific hint:
>
>   if you do not like a warning, try
>     (setq *break-on-signals* 'warning)
>   and look at the backtrace when you are thrown into the debugger.

o Hint3
(setq clos::*warn-if-gf-already-called* nil)

Note that the above mentioned FAQ explicitly say that it's a bad idea
to shut up warnings.  Please to so only temporarily.
Similarly, IGNORE-ERRORS is to be used sparesely.

Regards,
	Jorg Hohle
Telekom/T-Systems Technology Center