start-repl

swank.swank

  • (start-repl port & opts)
  • (start-repl)
Start the server wrapped in a repl. Use this to embed swank in your code.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source swank/swank.clj:60 top

(defn start-repl
  "Start the server wrapped in a repl. Use this to embed swank in your code."
  ([port & opts]
     (let [stop (atom false)
           opts (merge {:port port
                        :encoding (or (System/getProperty
                                       "swank.encoding")
                                      "iso-latin-1-unix")}
                       (apply hash-map opts))]
       (repl :read (fn [rprompt rexit]
                     (if @stop rexit
                         (do (reset! stop true)
                             `(start-server (-> "java.io.tmpdir"
                                                (System/getProperty)
                                                (File. "slime-port.txt")
                                                (.getCanonicalPath))
                                            ~@(apply concat opts)))))
             :need-prompt #(identity false))))
  ([] (start-repl 4005)))
Vars in swank.swank/start-repl: apply concat defn fn identity let reset! -> deref list seq
Used in 0 other vars

Comments top

No comments for start-repl. Log in to add a comment.