On Thu, Dec 9, 2010 at 5:58 AM, Alex Osborne <a...@meshy.org> wrote:
> Sunil S Nandihalli <sunil.nandiha...@gmail.com> writes:
>
>> I would like to know what meta info does &form that get passed to
>> your macro.. actually contain? I am able to only get the line
>> number.. Is there a way to get the file name aswell?
>
> The currently evaluating/compiling file (if it is a file and not the
> REPL or some other instance of eval) is in the var *file*.  The current
> namespace is in the var *ns*.

Hm. *ns* is sometimes overridden (usually inside a call to "eval"
though) but *file* is probably pretty reliable and I did not know
about it, and it will directly give Sunil the file name he wants.
Thanks.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to