On Oct 23, 9:02 pm, "Mike Hinchey" <[EMAIL PROTECTED]> wrote:
> Binding isn't suppose to work for macros.  Macros expand during
> compile-time, and binding only affects vars at runtime.  

Binding works on vars, and a macro is a function in a var, so binding
does work on macros. But you hit the nail on the head with compile-
time vs runtime. My test case is compiled with the standard 'and',
then 'and' is bound before the expression is executed, but it's too
late to make a difference.

The following works as I wanted:

(binding [and bind-test]
(load-file "./classes/bind-test.clj")
)

where bind-test.clj contains (and ...). This works since the 'and'
binding is executed before the file is loaded and compiled.

Thanks very much for your help.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to