The procedure differs depending on whether you are using slime-connect
to start slime (by connect to a remote swank server, created with lein swank
, for example) or you are starting slime using M-X slime
.
If you're using slime-connect
, you'll need to modify the classpath of the java process that is running the swank server. If you're starting the swank server using lein swank
, simply add the jars you want to be part of your classpath to the project's lib
directory.
On the other hand, if you're starting slime using M-X slime
, the following elisp code will do the magic for you (just place it in your ~/.emacs file).
(eval-after-load "swank-clojure"
'(progn
(add-to-list 'swank-clojure-classpath
"/Users/smcho/.clojure/")
(add-to-list 'swank-clojure-classpath
"/Users/smcho/.clojure/blah.jar")))
This will add /Users/smcho/.clojure/
and /Users/smcho/.clojure/blah.jar
to the classpath. (Please note that you'll either need to restart emacs or reload the .emacs file: type M-X load-library
and then type .emacs
on the next prompt.)