Re: Compiled COMPILE forms at load time Bug
Nikodemus Siivola <[email protected]>
| Newsgroups | gmane.lisp.cmucl.devel |
|---|---|
| Message-ID | <[email protected]> |
On 12 March 2010 14:01, Raymond Toy <[email protected]> wrote: > On 3/10/10 1:47 PM, Helmut Eller wrote: >> One more thing: >> >> (defmacro bar () 1) >> (compile 'bar '(lambda () 2)) >> >> should remove the macro binding for bar. >> > > Hmm. The CLHS entry for COMPILE says: > > if name is a symbol that names a macro, its macro function is updated > > What is that supposed to mean? The macro binding should be removed? > That we're defining a new macro expansion for that symbol? I believe it means this (which is the SBCL take on the subject): CL-USER> (defmacro foo () "old FOO") FOO CL-USER> (foo) "old FOO" CL-USER> (compile 'foo `(lambda (form env) (declare (ignore form env)) "new FOO")) FOO NIL NIL CL-USER> (foo) "new FOO" Cheers, -- Nikodemus