Skip to content

Instantly share code, notes, and snippets.

@mrh0057
Created October 24, 2011 22:03
Show Gist options
  • Save mrh0057/1310468 to your computer and use it in GitHub Desktop.
Save mrh0057/1310468 to your computer and use it in GitHub Desktop.
ClojureScript Inferior Lisp Mode Windows
@echo off
setLocal EnableDelayedExpansion
if "%CLOJURESCRIPT_HOME%" == "" set CLOJURESCRIPT_HOME=%~dp0..\
set CLASSPATH=%CLOJURESCRIPT_HOME%\src\clj;%CLOJURESCRIPT_HOME%\src\cljs;%CD%\src\cljs;%CD%\src\clj;%CD%\test\cljs;%CD%\test\clj"
for /R "%CLOJURESCRIPT_HOME%\lib" %%a in (*.jar) do (
set CLASSPATH=!CLASSPATH!;%%a
)
for /R "%CD%\lib" %%a in (*.jar) do (
set CLASSPATH=!CLASSPATH!;%%a
)
set CLASSPATH=!CLASSPATH!"
set REPL_CLJ="(require '[cljs.repl :as repl])(require '[cljs.repl.browser :as browser])(def env (browser/repl-env))(repl/repl env)"
java -server -cp "%CLASSPATH%" clojure.main -e %REPL_CLJ%
@mrh0057
Copy link
Author

mrh0057 commented Oct 25, 2011

  • Install emacs on your machine. Do NOT install from cygwin.

  • Put the script in your Window's path.

  • edit your .emacs or if you are using the emacs starter kit edit .emacs.d/custom.el

    (setq inferior-lisp-program "browser-repl")

  • Open a file in the root of your project and execute M-x inferior-lisp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment