May have found a bug, here is how to duplicate it. Hopefully someone
can confirm this.

Here is expected behavior when run in the repl:
Clojure 1.2.0-master-SNAPSHOT
user=> (ns foo)
nil
foo=> (defmacro f []
 `(eval `(def ~'~'x 'foo)))
#'foo/f
foo=> (ns bar)
nil
bar=> (defn b []
 (foo/f))
#'bar/b
bar=> (b)
#'bar/x

However, if you put them in separate files the namespace of x changes:

$ ls -R *
clojure-1.2.0-master-SNAPSHOT.jar

src:
bar.clj  foo.clj

$ cat src/foo.clj
(ns foo)

(defmacro f []
 `(eval `(def ~'~'x 'foo)))

$ cat src/bar.clj
(ns bar (:require foo))

(defn b []
 (foo/f))

$ java -cp clojure-1.2.0-master-SNAPSHOT.jar:src/ clojure.main -e "(do
(require 'bar) (bar/b) )"
#'user/x

^^ That should read #'bar/x instead of #'user/x

Best,
Brent

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