Hi Nikita,

That's interesting. Things work for me (details below). A couple notes:

1) Since quil.sketch requires macros from its own namespace, consuming 
namespaces like quil.core get them for free. In other words, no need to add 
:include-macros true when requiring quil.sketch. If you do (doc ns), you will 
see this concept referred to as "implicit macro loading".

2) Owing to an accident or artifact of the way macros are implemented, 
(cljs.core$macros/or false true) actually works. I haven't investigated why 
this is the case.

So, here is what works for me:

src/quil/sketch.clj:

(ns quil.sketch)

(defmacro defsketch
  [app-name & options]
  `(str "Hello " ~app-name "!"))

src/quil/sketch.cljs:

(ns quil.sketch
  (:require-macros [quil.sketch]))

src/quil/core.cljc:

(ns quil.core
  (:require [quil.sketch :as ap]))

(defmacro defsketch
  [app-name & options]
  `(quil.sketch/defsketch ~app-name ~@options))

And using this from Planck:

$ planck -c src
cljs.user=> (require-macros 'quil.core)
nil
cljs.user=> (quil.core/defsketch "My App")
"Hello My App!"

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to