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
Once the package is created, and all symbols in it created, e.g., by loading your code that implements the package, you can export any symbols you like, e.g., to export all:
(do-all-symbols (sym (find-package :foo)) (export sym))
You'll probably be happier with
(let ((pack (find-package :foo)))
(do-all-symbols (sym pack) (when (eql (symbol-package sym) pack) (export sym))))
which won't try re-exporting everything from used packages.