[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to change inheritance of class options?

Dear netters,

I've created a metaclass with a particular behaviour, and made classes and
objects using it.  Fine.  However, when I make a subclass of one of my new
classes, it does not inherit the metaclass affiliation.

To clarify:

? (defclass mc0 (standard-class) ())
? (defclass c0 () () (:metaclass mc0))
#<MC0 C0>
? (defclass c1 (c0) ())

i.e., the class-option slot is not being inherited.  That is expected,
described in Steele. However, what I would like to have is

? (defclass c1 (c0) ())
#<MC0 C1>

How can I do this? I have tried messing with the defclass macro (out of my
league) and with make-instance (standard-class) and even default-initargs,
but I can't make sense of it.  I have looked in the faq's, the MCL manual,
Steele, and Kiczales and it just makes me feel foolish...

Thanks a lot,

Ethan Benatan