                        (catch Exception e
                          (println (.getMessage e))
                          read-error))]
+            ;; TODO: need to catch errors here too - David
             (cond
               (identical? form read-error) (recur)
               (= form :cljs/quit) :quit
 
               (and (seq? form) (is-special-fn? (first form)))
-              (do (apply (get special-fns (first form)) repl-env (rest form)
-                    opts)
-                  (newline)
-                  (recur))
+              (do
+                ((get special-fns (first form))
+                  repl-env form opts)
+                (newline)
+                (recur))
 
               :else
               (do (eval-and-print repl-env env form)

(def default-special-fns
  (let [load-file-fn
        (fn self
          ([repl-env file]
            (self repl-env file nil))
          ([repl-env file opts]
            (load-file repl-env file opts)))]
    {'in-ns
     (fn self
       ([_ quoted-ns]
         (self _ quoted-ns nil))
       ([_ quoted-ns opts]
         (let [ns-name (second quoted-ns)]
           (when-not (ana/get-namespace ns-name)
             (swap! env/*compiler* update-in [::ana/namespaces ns-name] {:name ns-name}))
           (set! ana/*cljs-ns* ns-name))))
     'load-file load-file-fn
     'clojure.core/load-file load-file-fn
     'load-namespace
     (fn self
       ([repl-env ns] (self repl-env ns nil))
       ([repl-env ns opts]
         (load-namespace repl-env ns opts)))}))

(defn analyze-source

            [cljs.closure :as cljsc]
            [cljs.source-map :as sm]
            [clojure.tools.reader :as reader]
            [clojure.tools.reader.reader-types :as readers]
            [cljs.util :as util]))

(def ^:dynamic *cljs-verbose* false)

