[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How can I change the arguments of a generic function?
- To: email@example.com
- Subject: How can I change the arguments of a generic function?
- From: firstname.lastname@example.org (UEDA masaya)
- Date: Thu, 22 Oct 92 15:44:42 JST
- In-reply-to: Marc Domenig's message of Wed, 21 Oct 1992 18:20:32 +0100 <268*/S=domenig/OU=urz/O=unibas/PRMD=SWITCH/ADMD=ARCOM/C=CH/@MHS>
Thank you for many kind reply.
From: naha@RIVERSIDE.SCRC.Symbolics.COM (Mark Nahabedian)
You need to redefine the generic function using DEFGENERIC if you want
to change its argument list. Once you do that you will then need to
make the corresponding change to the argument list of every method and
recompile them. This is true of every CLOS implementation.
From: Marc Domenig <email@example.com>
if you want to change the generic function, you can do this with
Command-/, as suggested in the error message in the Listener. Example:
Yes I can. But if I type Command-/ to continue, existing methods are
removed. When I wrote those methods, I do not hesitate. But when they
are predefined methods, what should I do?
For example, if I define an :after method of set-view-font-code and try
to add a new keyword argument to it, Error: Incompatible lambda list
? (defmethod set-view-font-codes :after ((kfm kanji-fred-mixin) ff ms
&optional ff-mask ms-mask
> Error: Incompatible lambda list in #<STANDARD-METHOD SET-VIEW-FONT-CODES :AFTER (KANJI-FRED-MIXIN T T)> for #<STANDARD-GENERIC-FUNCTION SET-VIEW-FONT-CODES #x94A576>
> While executing: CCL::CHECK-DEFMETHOD-CONGRUENCY
> Type Command-/ to continue, Command-. to abort.
> If continued: Remove 5 methods from the generic-function and change its lambda list.
See the RestartsI menu item for further choices.
If I type command-/, 5 set-view-font-codes methods are removed and the
result is not acceptable.
Is such attempt pseudo in itself?
Any suggestion would be appreciated.