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
which generally starts with (in-package :foo)
and put the package definition to a file package.lisp
which generally involves something like this:
(in-package :cl-user)
(defpackage :foo
(:use :cl)
(:documentation "Bla bla bla."
(:export :*global-var-1*
:*global-var-2*
:function-1
:function-2
:struct
:struct-accessor-fun-1
:struct-accessor-fun-2
:struct-accessor-fun-3
:struct-accessor-fun-4))
My question is: Designing simply an interface using some global variables and functions may not be adequate sometimes, and you have to export some structures. When this is the case, if you don't simply export accessor functions of this struct, you can not manipulate objects of these struct. So, is there an easy way for accomplishing this effect without manually exporting all these accessor functions?