 (defnail DocLookup
   "Usage: ng de.kotka.vimclojure.nails.DocString [options]"
   [[nspace n "Lookup the symbols in the given namespace." "user"]]
-  (let [nspace  (resolve-and-load-namespace nspace)
+  (let [nspace  (util/resolve-and-load-namespace nspace)
         symbols (map symbol (line-seq (BufferedReader. *in*)))]
-    (print (doc-lookup nspace symbols))
+    (print (backend/doc-lookup nspace symbols))
     (flush)))
 
 (defnail FindDoc

    (-> (hash-map "Func"     (map first fns)
                  "Macro"    (map first macros)
                  "Variable" (map first vars))
      clj->vim
      println)))

(defnail NamespaceOfFile
  "Usage: ng de.kotka.vimclojure.nails.NamespaceOfFile"
  []
  (let [of-interest '#{in-ns ns clojure.core/in-ns clojure.core/ns}
        in-seq      (stream->seq *in*)
        candidate   (first
                      (drop-while #(or (not (instance? clojure.lang.ISeq %))
                                       (not (contains? of-interest (first %))))

                           LineNumberingPushbackReader.)
                 ~'*out* (-> ~'nailContext .out OutputStreamWriter.)
                 ~'*err* (-> ~'nailContext .err PrintWriter.)]
         (util/with-command-line (.getArgs ~'nailContext)
           ~usage
           ~arguments
           ~@body)
