DEFCONSTANT and DEFMETHOD ignore *SUPPRESS-CHECK-REDEFINITION*.
1. DEFCONSTANT ignores *SUPPRESS-CHECK-REDEFINITION*
[1]> (setf custom:*suppress-check-redefinition* t)
T
[2]> (defconstant a (gensym))
A
[3]> (defconstant a (gensym))
WARNING: (DEFCONSTANT A (GENSYM)) redefines the constant A. Its old value was #:G12919.
A
Note that DEFCONSTANT never issues a warning when the value is the same. That is the fact it doesn't warn in the following situation is irrespective of *SUPPRESS-CHECK-REDEFINITION*:
[4]> (setf custom:*suppress-check-redefinition* nil)
NIL
[5]> (defconstant b 1)
B
[6]> (defconstant b 1)
B
2. DEFMETHOD ignores *SUPPRESS-CHECK-REDEFINITION*
[1]> (defgeneric a (x))
#<STANDARD-GENERIC-FUNCTION A>
[2]> (defmethod a ((x t)) x)
#<STANDARD-METHOD (#<BUILT-IN-CLASS T>)>
[3]> (a '(2)) ;; call the method
(2)
[4]> (setf custom:*suppress-check-redefinition* t)
T
[5]> (defmethod a ((x list)) x)
WARNING: The generic function #<STANDARD-GENERIC-FUNCTION A> is being
modified, but has already been called.
#<STANDARD-METHOD (#<BUILT-IN-CLASS LIST>)>
Demonstrates how custom:suppress-check-redefinition is ignored
Logged In: YES
user_id=870521
Originator: YES
My CLisp version:
[6]> (lisp-implementation-version)
"2.42 (2007-10-16) (built 3401715121) (memory 3403718434)"
On WinXP SP2
Logged In: YES
user_id=5735
Originator: NO
*SUPPRESS-CHECK-REDEFINITION* has nothing to do with DEFCONSTANT or DEFMETHOD.
it only deals with ordinary functions.
Logged In: YES
user_id=5735
Originator: NO
This bug report is now marked as "pending"/"invalid".
This means that we think that the problem you report
is not a problem with CLISP.
Unless you - the reporter - act within 2 weeks,
the bug will be permanently closed.
Sorry about the inconvenience -
we hope your silence means that
you agree that this is not a bug in CLISP.
Logged In: YES
user_id=870521
Originator: YES
It would be nice if there were a way to suppress these other warnings too.
Logged In: YES
user_id=5735
Originator: NO
did you read FAQ?
Logged In: YES
user_id=870521
Originator: YES
I presume you're referring to the section "How do I disable this annoying warning?" ?
I did. The redefinitions are intentional, the result of a "reset", which reloads files on behalf of the user. On CLisp, this process generates pages of spurious warnings. (This isn't an issue on other major Lisps - Allegro & Lispworks).
Logged In: YES
user_id=5735
Originator: NO
--- defconstant: the warning tells you that your code is non-ANSI conforming.
specifically, you are not allowed to redefine constants. use defparameter instead.
you cannot disable the warning except by a judicious use of eval-when or,
better yet, separating defconstants into a separate file which is not re-loaded.
--- defmethod: *warn-if-gf-already-called*
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Logged In: YES
user_id=5735
Originator: NO
BTW, take a look at http://clisp.podval.org/impnotes/mop-clisp.html#mop-clisp-warn
(this is a feature in the CVS clisp)