macros and eval-when
From: Andreas Eder (Andreas.Eder_at_gmx.net)
Date: 11/24/04
- Next message: David Steuber: "Re: Floating-point arithmetic in CL"
- Previous message: Pascal Bourguignon: "Re: Probably a simple question about list variables"
- Next in thread: Wade Humeniuk: "Re: macros and eval-when"
- Reply: Wade Humeniuk: "Re: macros and eval-when"
- Reply: Tim Bradshaw: "Re: macros and eval-when"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 24 Nov 2004 16:33:40 +0100
Hi,
I have a question concerning the use macros and eval-when situations.
Suppose I have a file in which a define some macros and want to use
them in the same file afterwards.
Then, I have to wrap the definition of the macros with
(eval-when (:compile-toplevel) (defmacro ... ))
Is that right?
But in a lot of code that I've seen, the defmacros are wrapped with
(eval-when (:compile-toplevel :load-toplevel :execute) ... )
Is there any reason to use :load-toplevel and :execute here ?
Macroexpansion happens before loading and executing, doesn't it?
Where is the fault in my reasoning?
Thanks
Andreas
-- Wherever I lay my .emacs, there's my $HOME.
- Next message: David Steuber: "Re: Floating-point arithmetic in CL"
- Previous message: Pascal Bourguignon: "Re: Probably a simple question about list variables"
- Next in thread: Wade Humeniuk: "Re: macros and eval-when"
- Reply: Wade Humeniuk: "Re: macros and eval-when"
- Reply: Tim Bradshaw: "Re: macros and eval-when"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|