Sam Steingold <[EMAIL PROTECTED]> writes: > this file works in GCL, CLISP and LW but not in CMUCL: > ----- > (defstruct a b c) > (defparameter *foo* #.(make-foo)) > ----- > > As people have pointed out, ANSI 3.2.4.4 requires a MAKE-LOAD-FORM > method for that to work, so I added this: > > #+cmu > (defmethod make-load-form ((self structure-object) &optional environment) > (make-load-form-saving-slots self :environment environment)) > > Then I get a zillion errors:
Sam, I told you why this MAKE-LOAD-FORM method is totally broken in Message-ID: <[EMAIL PROTECTED]> sent to cmucl-help around 2004-11-09 21:20 UTC. Did you perhaps miss it? I didn't Cc you in that reply because of your headers Mail-Followup-To: [EMAIL PROTECTED] Mail-Copies-To: never but maybe I should have? > ; In: DEFSTRUCT FOO > > do I need to redefine defstruct to always define a make-load-form method?! You need to define a MAKE-LOAD-FORM method on your structure's class, to reflect the similarity relationship that you want, rather than assuming that MAKE-LOAD-FORM-SAVING-SLOTS does the right thing for all possible structure types in the entire system. See my earlier message for a more detailed explanation. Cheers, Christophe
