You don't show what you did, and what the two implementations complained about.  Indeed, progn is the usual way to have a macro return multiple forms.  progn is defined not to affect the top-level-ness or not-top-level-ness of the current environment.

But I'll make a guess what's wrong.  The in-package form changes the value of *package*, which affects where the reader interns symbols, but your defun form is _not_ subsequently processed by the reader.  The symbols in the defun are already interned symbols, not strings, and are interned in whatever package they were read into when the reader saw them.

HTH


On Fri, Mar 14, 2014 at 8:45 AM, Paul Tarvydas <paultarvydas@gmail.com> wrote:
What is the best way to write a macro that returns more than one form to the top level?  E.g.

(in-package :xxx)
(defun ...)

I've been wrapping a progn around the result, but LW doesn't like it very much, and SBCL seems to hate it.

Thanks
pt