Hi t,

On Sun, Apr 13, 2014 at 3:18 PM, t x <txrev...@gmail.com> wrote:
> What does 
> https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L209-L211
> mean ?
>
> In particular, I'm confused about:
>
>>> Forms to prepend to every form that is evaluated inside your project.
>
> I only want to insert it right into the (ns ...) clause.
>
> Thanks!

The ns macro is only one way to require a namespace.

The way :injections works (at least the way it appears to work, I've
never personally used it) is by allowing you to use the alternate
means of requiring another namespace which is programmatically.

In other words you can have a `(:require …)` section in your `ns`
macro, or you could simply have a regular `(require '…)` form in your
source.

So the real question becomes if there is a programmatic call you can
make to `(require-macros …)`, which from brief googling appears not to
be the case.

If the answer to that is no then I would say to look into the
templating features of your editor to facilitate easily adding it in.

As a stylistic note, the more magical you make your source files, the
harder they are to understand going forward. People are used to seeing
all the symbols they might encounter in the source file listed in the
`ns` macro. Violating that might be expedient, but it's probably not
good style. In this instance, I'd swallow the repetition for the sake
of clarity.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
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/d/optout.

Reply via email to