Useful utilities for using swank-clojure with slime
Emacs Lisp
Switch branches/tags
Nothing to show
Pull request Compare This branch is 5 commits behind emacsmirror:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


* swank-clojure-extra

swank-clojure-extra provides some extra utilities for using slime [1] with
swank-clojure [2]. The extras provided by this package includes

 - swank-clojure-project: a way to open swank-clojure on a specific
   project. This is very useful as java does not provide a way to
   modify classpath at runtime.
 - manual configuration of swank/slime.
 - start a Leiningen swank server (and connect) from within Emacs: swank-clojure-lein-swank
 - more to come..

This project is an offshoot of swank-clojure and was created as an attempt
to separate emacs specific utilities which got added over a period of time
into swank-clojure.el into a separate project. The rationale behind this
split is explained in this thread:


* Usage

In your ~/.emacs file, add the swank-clojure-extra into your load-path
and load it.

(add-to-list 'load-path "~/src/swank-clojure-extra")
(require 'swank-clojure-extra)

** Customization

swank-clojure-extra provides the a few variables which can be customized
from your emacs configuration files.

Here is what I have in my ~/.emacs file:

(setq  swank-clojure-classpath (append (list "/usr/share/java/clojure.jar"
				       (directory-files "/usr/share/java/"

(eval-after-load "slime"
     (require 'swank-clojure-extra)
     (add-to-list 'slime-lisp-implementations `(clojure ,(swank-clojure-cmd)
							:init swank-clojure-init)
     (add-hook 'slime-indentation-update-hooks 'swank-clojure-update-indentation)
     (add-hook 'slime-repl-mode-hook 'swank-clojure-slime-repl-modify-syntax t)
     (add-hook 'clojure-mode-hook 'swank-clojure-slime-mode-hook t)))