From: Joe Marshall
Subject: Re: ····@
Date: 
Message-ID: <7kffdhsg.fsf@ccs.neu.edu>
Pascal Costanza <········@web.de> writes:

> I have written the following macro.
> [elided]

I can see where you might want to get at the nth form in a progn, but
grabbing stuff out of the middle of an application is just ugly.  (not
to mention the scoping problems Barry pointed out.)  How about
something like this:

(mvprog1-with-prelude ((setq *x* 'foo)
                       (format t "foo!"))
   (call-next-method)
   (format t "bar!"))

No funky identifiers, no scoping and nesting problems.

If you find that you need the values from the middle of an
application, and you don't want to rewrite the code, you can do this:

(let (retval)
  (...)
  (format t (setq retval "Hello world."))
  (...)
  retval)

This is pretty ugly, too, but then the next person who reads the code
won't have to look at your macro to try to figure out what the atsign
is doing.