SRRAT: use MRAT reader functions instead of CADDAR, etc.
[maxima.git] / archive / src / method-compat.lisp
blob98abf5c88222e0fa3a3e718a300915024a869b7c
1 ;;;-*- Mode: Lisp; package:maxima; syntax:common-lisp -*-
3 #-symbolics
4 (error "should not load for other than symbolics")
6 ;#+genera
7 (shadow '(defmethod defflavor) 'cl-maxima)
9 ;#+genera
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 ))
20 options)))
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))