Skip to content

Instantly share code, notes, and snippets.

@danluu
Created November 23, 2009 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danluu/241216 to your computer and use it in GitHub Desktop.
Save danluu/241216 to your computer and use it in GitHub Desktop.
(defun reset-swank ()
"Because changing swank-clojure-extra-classpaths is not enough
to force a new instance of slime to use it."
(interactive)
(setq slime-lisp-implementations
(assq-delete-all 'clojure slime-lisp-implementations))
(add-to-list 'slime-lisp-implementations
`(clojure ,(swank-clojure-cmd) :init swank-clojure-
init) t))
(defun run-slime (dir)
(interactive "DProject directory: ")
(cd dir)
(when (file-directory-p "~/.clojure") (directory-files "~/.clojure" t ".jar$"))
(make-directory "classes"))
(setq swank-clojure-extra-classpaths '("src" "classes" "lib/*" ""))
(reset-swank)
(slime))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment