forked from relevance/labrepl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start swank if the environment variable is set.
Added a swank script for Windows.
- Loading branch information
Shawn Hoover
committed
Mar 24, 2010
1 parent
a7085c7
commit f27f975
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
(when-let [run-swank (System/getenv "LABREPL_SWANK")] | ||
(println "Starting swank...") | ||
;; Drop the enclosing double quotes from the environment variable and eval it. | ||
(load-string (if (re-find #"^\".*\"$" run-swank) | ||
(->> run-swank (drop 1) (butlast) (apply str)) | ||
run-swank))) | ||
|
||
(require 'labrepl) | ||
(set! *print-length* 100) | ||
(labrepl/-main) | ||
(labrepl/-main) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
setlocal | ||
set LABREPL_SWANK="(require 'swank.swank) (swank.swank/start-repl 4005)" | ||
call %~dp0repl.bat |