[Update: I redid these instructions when I moved to clojure 1.1 . Take a look if you're interested]
For the last couple of days, I've been enjoying the combination of Clojure + Emacs + SLIME . Getting it working on my Mac was relatively straightforward (although I hit one minor bump).
To get started, git and Java 6 need to be installed on your Mac. I used the Java 6 SDK supplied by Apple (Java 5 might also work but I'm not using that). git was installed through MacPorts .
1. Get clojure-mode
> mkdir ~/src
> cd ~/src
> git clone git://github.com/jochu/clojure-mode.git
2. Add these lines to your .emacs
(add-to-list 'load-path "~/src/clojure-mode")
(require 'clojure-mode)
Restart emacs (or evaluate the 2 lines above)
3. M-x clojure-install (inside emacs)
4. When done, you'll see something like this.
5. If you do as the instruction suggest, you'll get an error about missing a file or directory.
6. Add the following lines to your .emacs
(setq swank-clojure-classpath '())
(add-to-list 'swank-clojure-classpath "~/src/clojure-contrib/clojure-contrib.jar")
(add-to-list 'swank-clojure-classpath "~/src/clojure/clojure-1.0.0-SNAPSHOT.jar")
(clojure-slime-config)
Restart emacs (or evaluate these lines). Note: you can use the swank-clojure-classpath variable to add jar files or directories to your classpath to work with in SLIME.
7. M-x slime
P.S Some weirdness with the formatting. I was having trouble with the blog editor.