From: Howard R. Stearns
Subject: Re: CMUCL and GLOBAL SYMBOL MACRO
Date: 
Message-ID: <328A1B74.7D55368C@elwoodcorp.com>
Mertens Marc wrote:
> 
> Hello ,
> 
>        I'm using CMUCL and wan't to create a global symbol macro. This
> is a global symbol associated with a lisp (alien c-function) with the
> following propertys (X is the global symbol macro) :
> 
>   - If I refer to X like in (setf A X) , an associated function is
> calculated and this value is returned as the value associated with X.
>   - If I set x like in (setf X form) , then another function is exucuted
> , with the result of form as input.
>        Does someone know how to do this ?
> 
> Thanks a lot in advance
> 
> Marc Mertens
> ·········@akam.be

I'm not following your example, so it is not clear to me why you need a
global symbol macro.  You might try looking at define-setf-expander and
friends.

As for actual global symbol macros, I think you are out of luck.
Define-symbol-macro was not in CLtL2 and, like most "Common Lisp"
systems, CMUCL doesn't define it.  It is my understanding that this was
added late in the ANSI process to support ISLisp constructs like global
lexicals (i.e. non-dynamic variables "known" to be defined at the
top-level).  Unless you are implementing a language that is meant to
coexist with Lisp, it is not clear to me that you would need global
symbol macros.  On the other hand if you do need them, I also do not
think that there is a way to make CMUCL respect them without going into
the guts of the compiler/evalator.