Created
March 30, 2010 16:55
-
-
Save drewr/349294 to your computer and use it in GitHub Desktop.
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
(add-to-list 'load-path (expand-file-name "~/elisp/slime")) | |
(add-to-list 'load-path (expand-file-name "~/elisp/slime/contrib")) | |
(require 'slime) | |
(slime-setup '(slime-repl)) | |
(add-to-list 'load-path (expand-file-name "~/elisp/clojure-mode")) | |
(add-to-list 'load-path (expand-file-name "~/elisp/swank-clojure")) | |
(require 'clojure-mode) | |
(add-hook 'clojure-mode-hook 'aar/lispy-parens) | |
(load "swank-clojure") | |
(setq slime-net-coding-system 'utf-8-unix) | |
(setq auto-mode-alist | |
(cons '("\\.clj$" . clojure-mode) | |
auto-mode-alist)) | |
(setq swank-clojure-binary (expand-file-name "~/bin/clojure")) | |
(defun classpathize (paths) | |
(mapconcat 'expand-file-name paths ":")) | |
(defmacro add-clojure-project (project path) | |
(let* ((fullpath (expand-file-name path)) | |
(classpaths (mapcar | |
(lambda (p) | |
(concat fullpath p)) | |
'("/lib/*" | |
"/src/clj"))) | |
(clj (expand-file-name "~/bin/clojure"))) | |
`(add-to-list 'slime-lisp-implementations | |
(backquote | |
(,project | |
("env" | |
,(concat "CLASSPATH=" (classpathize classpaths)) | |
,clj) | |
:init swank-clojure-init)) t))) | |
(progn | |
(setq slime-lisp-implementations '()) | |
(add-clojure-project fleetdb "~/src/fleetdb") | |
(add-clojure-project dispatchr "~/src/dispatchr") | |
(add-clojure-project missive "~/src/nmd/missive") | |
(add-clojure-project brite "~/src/brite") | |
...) |
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
#!/bin/bash | |
PATH=$HOME/bin:$PATH; export CLASSPATH | |
OPTS="-server -Xms8m -Xmx96m" | |
OPTS="${OPTS} -XX:-UseGCOverheadLimit" | |
#OPTS="${OPTS} -Xverify:none" | |
#OPTS="${OPTS} -Xms500m -Xmx1g" | |
#OPTS="${OPTS} -XX:+UseConcMarkSweepGC" | |
#OPTS="${OPTS} -XX:+HeapDumpOnOutOfMemoryError" | |
#OPTS="-server -Xverify:none -Xbootclasspath/a:${clj}" | |
#OPTS="${OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=15000" | |
cmd="exec java -Dpid=$$ $OPTS clojure.main $*" | |
echo CLASSPATH=$CLASSPATH >&2 | |
echo $cmd | |
$cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment