[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXPORT (was: Re: new version now at Karlsruhe)

Joachim Schrod writes:

> Btw, does anybody know of a more elegant work-around than
>     (export (intern "NAME" 'gi) 'gi)
> ?

The DEFPACKAGE macro is meant to solve all those problems that arise
from putting single EXPORT etc. forms into source files. You have no
problem if you put the export clause into the DEFPACKAGE form.
The only ugliness is that you writes string containing the symbol names
in upper case.

---------------- export.lsp ----------------------------
(defpackage "GI" (:export "NAME"))
(defun gi:name ()
  (print "Some obscure function."))
---------------- export-compile.lsp --------------------
(defpackage "GI" (:export "NAME"))
(compile-file "export")
---------------- snip snap -----------------------------