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

redefining arg list of clos method

    Date: Thu, 7 Feb 91 14:21:06 MST
    From: drstrip@cs.sandia.gov (David R Strip )

    While developing some clos code I have encountered the
    problem that if I 
    (defmethod foo ((x class)) ...
    and then later decide I really want
    (defmethod foo ((x class) &optional (more t)) ....
    the compiler complains that this does not conform
    to the arg list for foo, and none of the proceed optioins
    allows the arg list to be redefined. ( This should 
    be reasonable if the method is only defined for a
    single class). The way I currently get around this is
    with a defgeneric foo (x more), 

I'm surprised DEFGENERIC lets you get away with this.

				    proceed with the
    redefinition, then recompile my method.

    Is there a better way around this (short of writing
    the arg list correcty the first time :-)

Have you tried m-X Kill Definition?  I think it works...

If all else fails, try (FMAKUNBOUND 'FOO).  I agree with you that the one of
your options when this blows up should offer to remove all the methods which
do not conform with the new definition.