On Thu, Dec 9, 2010 at 4:20 AM, Sunil S Nandihalli
<sunil.nandiha...@gmail.com> wrote:
> Hello everybody,
>  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?

user=> (defmacro foo [x] `(quote ~(meta &form)))
#'user/foo
user=> (foo bar)
{:line 380}

<in faddle.clj>

(ns faddle)
(defmacro foo [x] `(quote ~(meta &form)))
(defn futz [] (foo bar))

<load-file>

#'faddle/futz
user=>

<change-repl-to-file-ns>

faddle=> (futz)
{:line 3}

No. It looks like the &form meta contains only the :line key.

-- 
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