Marco Antoniotti
4/13/2015 12:25:00 PM
On Sunday, April 12, 2015 at 1:33:19 PM UTC+2, jara...@skynet.be wrote:
> Sorry for this simple question.
>
> I'd like to write a macro which generates a bunch of (related) items like
>
> (def-my-class ABC ...)
>
> would generate
>
> (defclass ABC ...)
>
> (defgeneric ABC-get ....)
> (defmethod ABC-get ...)
>
> and so on.
>
> AFAIK, the (single) value returned by a macro invocation is processed further.
> I do need to process several values.
> I tried VALUES but it takes only the first one.
>
> Many thanks for a hint,
> Helmut
This is a worthwhile learning project provided that you realize that you really want (if your example above is an indication of your intent) is:
(def-my-class ABC () slot1 slot2 ... slotN)
==>
(defclass ABC ()
((slot1 :accessor ABC-slot1)
(slot2 :accessor ABC-slot2)
...
(slotN :accessor ABC-slotN))
)
Cheers
--
MA