(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)))
Used in 0 other vars
Comments top
No comments for start-repl. Log in to add a comment.