Subject: Re: lambda-returning defmacro, capture
From: (Rob Warnock)
Date: Thu, 14 Dec 2006 22:56:29 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Andreas Thiele <> wrote:
| <> schrieb:
| > What's the correct way to define a global without getting dynamic
| > scope, or SBCL warnings?
| I am not 100% sure but I think all global variables are special, meaning
| dynamic. I think this has to to with their environment. 
| Helpful might be:

Also helpful is KMP's writeup of "FAILED Issue PROCLAIM-LEXICAL"
(a reference to which is found in Ron's excellent little paper above):

The CL committee struggled over if/how to add "global lexicals"
and, in the end, simply punted. Actually, they *did* provide one out,
the DEFINE-SYMBOL-MACRO macro, which can be used to provide the
*appearance* of global lexicals, see: Symbols as Forms
    A binding for a symbol macro can be shadowed by
      1. DEFINE-SYMBOL-MACRO can be used to define global lexicals,
      by having a global lexical be a symbol macro that expands
      into a reference to a globally allocated cell that is not
      subject to dynamic binding.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607