         extras (map make ["catch" "finally"])]
     (concat parsed extras)))
 
+(defn parse-all*
+  [api]
+  (->> (get namespaces api)
+       (keys)
+       (mapcat #(parse-ns % api))
+       (doall)))
+
 (defn parse-all
   []
-  (let [syntax-parsed (parse-ns "syntax")
-        lib-parsed (binding [*cur-api* "library"]
-                     (->> cljs-lib-namespaces
-                          (mapcat parse-ns)
-                          doall
-                          add-catch-finally))
-        compiler-parsed (binding [*cur-api* "compiler"]
-                          (->> cljs-compiler-namespaces
-                               (mapcat parse-ns)
-                               doall))]
-    {:syntax syntax-parsed
-     :library lib-parsed
-     :compiler compiler-parsed}))
-
+  {:syntax   (parse-all* :syntax)
+   :library  (add-catch-finally (parse-all* :library))
+   :compiler (parse-all* :compiler)})
+

            (get-core-type-members type-names))))

;; pseudo-namespace since special forms don't have a namespace
(defmethod parse-ns "special" [ns-]
  (let [docs (->> (read-ns-forms "cljs.repl" :compiler)
                  (apply concat)
                  (keep #(parse-special-docs %))

;;------------------------------------------------------------

(defmulti parse-ns
  (fn [ns- api]
    (if (= :custom (get-in namespaces [api ns-]))
      [ns- api]
      [:default api])))

(defmethod parse-ns ["cljs.core" :library] [ns- api]
  ;; NOTE: Concatenation order is important here
  ;; so previously defined macros/functions are overwritten
  ;; by subsequent ones.
