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

Re: do-nothing macro generates nil nevertheless

In article <Pine.A32.3.91.950227130326.26069J-100000@swim5.eng.sematech.org>,
William D. Gooch <goochb@swim5.eng.sematech.org> wrote:
>On 27 Feb 1995, Dave Yost wrote:
>> My point is that some functionality is not provided:
>> namely, the ability of a macro to expand into _nothing_.
>Why not just use ,@(the-macro ...) ?  Then if it returns nil, you get 
>nothing.  Of course, it must always return a list for this to work.

I thought of this approach as well.  This has been my tactic in
similar situations in the past.

But I think in Dave Yost's case the invoking context is not
necessarily a backquote templating context, so ,@ might not be
possible.  I believe the example had (PROGN ... (THE-MACRO)), not
`(PROGN ... ,(THE-MACRO)).

- Andrew
			    Andrew Philpot
			 Recom Tech/NASA Ames