Craig McDaniel <craig...@gmail.com> writes:

> Correction:
>
> (defun reset-swank ()
>
> (defun run-slime (dir)

Here's what I use: (plagiarized from Tim Dysinger)

(defun slime-project (path)
  "Setup classpaths for a maven/clojure project & refresh slime"
  (interactive "GPath: ")
  (let ((original-dir default-dir))
    (cd path)
    (setq swank-clojure-binary nil)
    (setq swank-clojure-jar-path "target/dependency")
    (setq swank-clojure-extra-classpaths '("src" "target/classes" 
"target/dependency"))
    (setq swank-clojure-extra-vm-args 
'("-Dclojure.compile.path=target/classes"))
    (setq slime-lisp-implementations
          (cons `(clojure ,(swank-clojure-cmd) :init swank-clojure-init)
                (remove-if #'(lambda (x) (eq (car x) 'clojure))
                           slime-lisp-implementations)))
    (cd original-dir)))

This uses maven's bytecode target directory conventions. It assumes
clojure, contrib, etc are unpacked in target/dependency. This has the
additional benefit of not requiring you to restart SLIME when you add a
new dependency, just unpack it in the right place and your classpath
stays the same. Very handy.

-Phil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to