Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro my-macro (name)
- `(,name :initarg ,name
- :accessor ,(intern
- (format nil "MY-CLASS-~A" (symbol-name name)))))
- ;; => (MY-SLOT :INITARG MY-SLOT :ACCESSOR MY-CLASS-MY-SLOT), T
- (macroexpand '(my-macro my-slot))
- ;; => (SLOT MY-SLOT), NIL
- (macrolet ((slot (name)
- `(,name :initarg ,name
- :accessor ,(intern
- (format nil "MY-CLASS-~A" (symbol-name name)))
- )))
- (macroexpand '(slot my-slot)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement