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

Re: defmacro in let

    Date: Wed 26 Feb 86 10:27:27-PST
    From: Andy Freeman <ANDY@SU-SUSHI.ARPA>
    To: common-lisp@SU-AI.ARPA
    Subject: defmacro in let
    Message-ID: <12186489734.14.ANDY@SU-SUSHI.ARPA>
    The following is legal Common Lisp.
	(let ((tag (gensym)))
	  (defun foo ()
    What about this?  (Yes, this example is stupid, but there are uses of
    the idea that aren't.)
	(let ((tag (gensym)))
	  (defmacro foo ()
It is legal, but TAG is considered a special (i.e., the enclosing lexical
env. is ignored).  See pg 145.

    What about defsetf's inside top-level lets?

Unclear from the text how free references should be handled.  Since it
"resembles DEFMACRO" (pg. 103) I'd go with my answer above.  Should be
clarified though.

	-- Nick