Is there a short way of exporting all the symbols from a package or is it the only way to do it in defpackage
. I generally write my code in a file foo.lisp
There is a way with the cl-annot package. Its export-slots
, export-accessors
, export-constructors
allow to automatically export them. It works for classes and structures.
For example,
@export-accessors
(defclass foo ()
((bar :reader bar-of)
(bax :writer bax-of)
(baz :accessor baz-of)))
is equivalent to
(progn
(export '(bar-of bax-of baz-of))
(defclass foo ()
((bar :reader bar-of)
(bax :writer bax-of)
(baz :accessor baz-of))))