1 ;;;-*- Mode: Lisp; package:maxima; syntax:common-lisp -*-
4 (error "should not load for other than symbolics")
7 (shadow '(defmethod defflavor) 'cl-maxima
)
10 (eval-when (compile load eval
)
12 (defmacro defflavor
( name instance-variables component-flavors
&rest options
)
13 "This is just to allow compatibility with new names in symbolics"
14 `(global:defflavor
,name
,instance-variables
,component-flavors
15 ,@ (sublis '(#-ti
( :gettable-instance-variables .
:readable-instance-variables
)
16 #-ti
( :settable-instance-variables .
:writable-instance-variables
)
17 #-ti
( :outside-accessible-instance-variables .
:writable-instance-variables
)
18 #-ti
(:inittable-instance-variables .
:initable-instance-variables
)
19 #-ti
( :ACCESSOR-PREFIX .
:conc-name
))
22 (defmacro defmethod
(spec args
&body body
&aux leng
)
23 (cond ((listp spec
)(setq spec
(copy-list spec
))
24 (setq leng
(length spec
))
25 (setf spec
(append (last spec
) (firstn (- leng
1) spec
) ))
27 (t (error "how to handle specs")))
28 `(global:defmethod
,spec
,args
,@ body
))