find-macros-ns

functionsince v1.7.10Edit
(find-macros-ns ns)

Source docstring:
Returns the macros namespace named by the symbol or nil if it doesn't exist.
Bootstrap only.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn find-macros-ns
  [ns]
  (when (nil? NS_CACHE)
    (set! NS_CACHE (atom {})))
  (let [ns-str (str ns)
        ns (if (not ^boolean (gstring/contains ns-str "$macros"))
             (symbol (str ns-str "$macros"))
             ns)
        the-ns (get @NS_CACHE ns)]
    (if-not (nil? the-ns)
      the-ns
      (let [ns-obj (find-ns-obj ns)]
       (when-not (nil? ns-obj)
         (let [new-ns (create-ns ns ns-obj)]
           (swap! NS_CACHE assoc ns new-ns)
           new-ns))))))