[EMAIL PROTECTED] writes:
> There's a problem when i define a class with name "method" in a new package.
>
> * (defpackage toto)
> #<The TOTO package, 0/9 internal, 0/2 external>
>
> * (in-package toto)
> #<The TOTO package, 1/9 internal, 0/2 external>
>
> * *package*
> #<The TOTO package, 1/9 internal, 0/2 external>
* (package-use-list *package*)
=> implementation defined, but in this case will include the
COMMON-LISP package, which exports a symbol CL:METHOD...
> * (defclass titi () ()) ; it's ok
> #<STANDARD-CLASS TITI {48137BCD}>
>
> * (defclass method () ()) ; it's no more ok ?
... and CL:METHOD names a class, and here you are, redefining it.
That's not a good idea.
Try defining a package which doesn't implicitly use "COMMON-LISP".
(defpackage "FOO" (:use))
(in-package "FOO")
(cl:defclass method () ())
Cheers,
Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)