              is-special-fn? (set (keys special-fns))
              request-prompt (Object.)
              request-exit (Object.)
-             read-error (Object.)
              opts (if-let [merge-opts (:merge-opts (-setup repl-env opts))]
                     (merge opts merge-opts)
-                    opts)]
+                    opts)
+             read-eval-print
+             (fn []
+               (let [input (binding [*ns* (create-ns ana/*cljs-ns*)
+                                     reader/*data-readers* tags/*cljs-data-readers*
+                                     reader/*alias-map*
+                                     (apply merge
+                                       ((juxt :requires :require-macros)
+                                         (ana/get-namespace ana/*cljs-ns*)))]
+                             (repl-read request-prompt request-exit))]
+                 (or ({request-exit request-exit
+                       :cljs/quit request-exit
+                       request-prompt request-prompt} input)
+                   (if (and (seq? input) (is-special-fn? (first input)))
+                     (do
+                       ((get special-fns (first input)) repl-env env input opts)
+                       (print nil))
+                     (let [value (eval repl-env env input opts)]
+                       (print value))))))]
          (comp/with-core-cljs opts
            (fn []
              (when analyze-path

      - reads an object from the input stream, then
        - skips the next input character if it's end of line, then
        - returns the object."
  [request-prompt request-exit]
  (or ({:line-start request-prompt :stream-end request-exit}
        (skip-whitespace *in*))
    (let [input (read)]
      (skip-if-eol *in*)
      input)))

(defmacro with-read-known
  "Evaluates body with *read-eval* set to a \"known\" value,
   i.e. substituting true for :unknown if necessary."
  [& body]
  `(binding [*read-eval* (if (= :unknown *read-eval*) true *read-eval*)]
     ~@body))

;; =============================================================================
;; CLJS Specifics

  (:import [java.io File PushbackReader FileWriter]
           [java.net URL]
           [javax.xml.bind DatatypeConverter]
           [clojure.lang IExceptionInfo]))

(def ^:dynamic *cljs-verbose* false)
(def ^:dynamic *repl-opts* nil)
