From: Martin Cracauer
Subject: How to kill a compiler macro?
Date: 
Message-ID: <9n5i81$30tu$1@counter.bik-gmbh.de>
The Subject says it all:

How can I kill a compiler-macro previously defined?

I mean I have a defun and a compiler-macro in file foo.lisp and it is
already compiled and loaded into the running image.  Now I want to
change foo.lisp so that recompiling and reloading it into the image
already infected with the compiler-macro will only have the function
definition.

Uninterning the symbol will probably work, but is it guaranteed? Any
portable way?

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <········@bik-gmbh.de> http://www.bik-gmbh.de/~cracauer/
FreeBSD - where you want to go. Today. http://www.freebsd.org/

From: ···@itasoftware.com
Subject: Re: How to kill a compiler macro?
Date: 
Message-ID: <8zftk42b.fsf@itasoftware.com>
········@counter.bik-gmbh.de (Martin Cracauer) writes:

> The Subject says it all:
> 
> How can I kill a compiler-macro previously defined?
> 
> I mean I have a defun and a compiler-macro in file foo.lisp and it is
> already compiled and loaded into the running image.  Now I want to
> change foo.lisp so that recompiling and reloading it into the image
> already infected with the compiler-macro will only have the function
> definition.
> 
> Uninterning the symbol will probably work, but is it guaranteed? Any
> portable way?

How about 
  (define-compiler-macro foo (&whole form &rest ignore) form)

It isn't *quite* the same, but ought to do what you want.
From: Clive Tong
Subject: Re: How to kill a compiler macro?
Date: 
Message-ID: <uwv3dob5u.fsf@scientia.com>
········@counter.bik-gmbh.de (Martin Cracauer) writes:

> The Subject says it all:
> 
> How can I kill a compiler-macro previously defined?
> 

You can redefine the compiler macro so that it declines to provide an
expansion; from the specification 

"Unlike an ordinary macro, a compiler macro can decline to provide an
expansion merely by returning a form that is the same as the original
(which can be obtained by using &whole)."

> I mean I have a defun and a compiler-macro in file foo.lisp and it is
> already compiled and loaded into the running image.  Now I want to
> change foo.lisp so that recompiling and reloading it into the image
> already infected with the compiler-macro will only have the function
> definition.
From: Steven M. Haflich
Subject: Re: How to kill a compiler macro?
Date: 
Message-ID: <3B983A3A.3602BE9C@pacbell.net>
Martin Cracauer wrote:
 
> How can I kill a compiler-macro previously defined?
> 
> I mean I have a defun and a compiler-macro in file foo.lisp and it is
> already compiled and loaded into the running image.  Now I want to
> change foo.lisp so that recompiling and reloading it into the image
> already infected with the compiler-macro will only have the function
> definition.
> 
> Uninterning the symbol will probably work, but is it guaranteed? Any
> portable way?

Uninterning the symbol is guaranteed to work, but only with regard to
code that is newly read (compiled, loaded, whatever) by the reader.  Any
old code will still refer to the old, now-uninterned symbol.

However, there is a direct way to remove a compiler macro definition,
just as ther is a direct way to remove a function definition.  RTFANS
3.8.8 on COMPILER-MACRO-FUNCTION.
From: Kent M Pitman
Subject: Re: How to kill a compiler macro?
Date: 
Message-ID: <sfw4rqfr7vd.fsf@world.std.com>
"Steven M. Haflich" <·······@pacbell.net> writes:

> However, there is a direct way to remove a compiler macro definition,
> just as ther is a direct way to remove a function definition.  RTFANS
> 3.8.8 on COMPILER-MACRO-FUNCTION.

F for "fine", of course. ;-)
From: Geoffrey Summerhayes
Subject: Re: How to kill a compiler macro?
Date: 
Message-ID: <28Xl7.26891$A24.3199539@news20.bellglobal.com>
"Martin Cracauer" <········@counter.bik-gmbh.de> wrote in message
··················@counter.bik-gmbh.de...
>
> The Subject says it all:
>
> How can I kill a compiler-macro previously defined?
>
> I mean I have a defun and a compiler-macro in file foo.lisp and it is
> already compiled and loaded into the running image.  Now I want to
> change foo.lisp so that recompiling and reloading it into the image
> already infected with the compiler-macro will only have the function
> definition.
>
> Uninterning the symbol will probably work, but is it guaranteed? Any
> portable way?
>

(setf (compiler-macro-function 'name) nil)?

Geoff