Tagged as Programming
Written on 2010-05-22 13:00:56
This is just a quick configuration post. On Archlinux, clojure, clojure-contrib and swank-clojure-git packages are already available from the AUR. I'm a big fan of Common Lisp and use it for most of my programming, so I wanted to be able to use any of the 3 common lisp implementations installed from distro packages along with SBCL git built with clbuild or clojure without much fuss. Though there are a fair number of articles on clojure/emacs/slime setup and still more a google search away, I found it a bit of a pain to get things going the way I wanted.(setq slime-lisp-implementations
'((ccl ("ccl64"))
(ecl ("ecl"))
(sbcl ("sbcl"))
(sbcl-git ("/home/redline/builds/clbuild-dev/clbuild" "lisp"))))
(setq slime-default-lisp 'sbcl-git))
(add-to-list 'load-path "/usr/share/emacs/site-lisp/clojure-mode")
(require 'clojure-mode)
(add-to-list 'load-path "/usr/share/emacs/site-lisp/swank-clojure")
(require 'swank-clojure)
(add-hook 'clojure-mode-hook
'(lambda ()
(define-key clojure-mode-map "\C-c\C-e" 'lisp-eval-last-sexp)
(define-key clojure-mode-map "\C-x\C-e" 'lisp-eval-last-sexp)))
(eval-after-load "slime"
`(progn
(require 'assoc)
(setq swank-clojure-classpath
(list "/usr/share/clojure/clojure.jar"
"/usr/share/clojure/clojure-contrib.jar"
"/usr/share/emacs/site-lisp/swank-clojure/src"))
(aput 'slime-lisp-implementations 'clojure
(list (swank-clojure-cmd) :init 'swank-clojure-init))))