Re: Macros and symbols across packages
- From: Edi Weitz <spamtrap@xxxxxxxxxx>
- Date: Sun, 29 May 2005 11:56:43 +0200
On 28 May 2005 23:00:32 -0700, "Jeff M." <massung@xxxxxxxxx> wrote:
> I'm curious if there is a method of making sure that symbols will
> evaluate "properly" across packages for use in a macro. For example,
> I have a package that will generate ARM assembly code like so:
>
> (addne r0 r0 r1 :lsl 4) => #x...
>
> Of course, when I use these macros from outside the ARM package,
> though, none of my symbols (registers) match those in the ARM
> package.
You could look at the symbol's /name/ only. This is basically what
LOOP does.
* (make-package :foo)
* (loop foo::for x foo::below 3 foo::collect x)
(0 1 2)
Cheers,
Edi.
--
Lisp is not dead, it just smells funny.
Real email: (replace (subseq "spamtrap@xxxxxxxxxx" 5) "edi")
.
- Follow-Ups:
- Re: Macros and symbols across packages
- From: Jeff M.
- Re: Macros and symbols across packages
- References:
- Macros and symbols across packages
- From: Jeff M.
- Macros and symbols across packages
- Prev by Date: Re: Critique my (a newbie's) debugging macro
- Next by Date: Re: my first Lisp code...comments welcome
- Previous by thread: Re: Macros and symbols across packages
- Next by thread: Re: Macros and symbols across packages
- Index(es):
Relevant Pages
|
|