Not sure if it is exactly what you are looking for, but that looks fairly similar to how string interpolation works:
https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/strint.clj Maybe you can somehow make that work for you? On Tue, Feb 19, 2013 at 1:35 PM, AtKaaZ <atk...@gmail.com> wrote: > I am trying (but failing) to find a way to have a macro like: > => *(xmacro* {:a (+ 1 2) :b ~(+ 1 3)}) > {:a (clojure.core/+ 1 2), :b 4} > ;*without specifying the backquote ` on the input* > > I need it to behave like this: > => (*eval '`*{:a (+ 1 2) :b ~(+ 1 3)}) > {:a (clojure.core/+ 1 2), :b 4} > > But I don't get how I could do that, yet I feel I'm missing something > pretty basic. > > I've also made a gist for this: https://gist.github.com/AtKaaZ/4988320 > > But this is the best that I can do without errors: > > => (defmacro x [a] `~a ) > > => (*x `*{:a (+ 1 2) :b ~(+ 1 3)}) > {:a (clojure.core/+ 1 2), :b 4} > > But I don't want to have to specify the backquote ` in the > input to the macro, I need the macro to automatically add > that. > > Thank you for your help. > > > -- > Please correct me if I'm wrong or incomplete, > even if you think I'll subconsciously hate it. > > -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.