SLIME, the Superior Lisp Interaction Mode for Emacs, is an Emacs mode for developing Common Lisp applications. SLIME originates in an Emacs mode called SLIM written by Eric Marsden and developed as an open-source project by Luke Gorrie and Helmut Eller. Over 100 Lisp developers have contributed code to SLIME since the project was started in 2003. SLIME uses a backend called SWANK that is loaded into Common Lisp.
SLIME works with the following Common Lisp implementations:
- CMU Common Lisp (CMUCL)
- Scieneer Common Lisp
- Steel Bank Common Lisp (SBCL)
- Clozure CL (former OpenMCL)
- Allegro Common Lisp
- Embeddable Common Lisp (ECL)
- Armed Bear Common Lisp (ABCL)
Some implementations of other programming languages are using SLIME:
There are also clones of SLIME:
Install with Portacle
Portacle is a portable and multiplatform development environment for Common Lisp. It's the easiest way to get SBCL + Emacs + Slime + Quicklisp + Git.
Install with package.el
Slime is in GNU ELPA. You can install it with M-x package-install RET slime RET.
Here's a few useful Emacs Lisp code snippets for your SLIME configuration within your Emacs configuration file:
;; a list of alternative Common Lisp implementations that can be ;; used with SLIME. Note that their presence render ;; inferior-lisp-program useless. This variable holds a list of ;; programs and if you invoke SLIME with any prefix argument, ;; like M-- M-x slime or C-u M-x slime, you can select a program ;; from that list. (setq slime-lisp-implementations '((ccl ("ccl")) (clisp ("clisp" "-q")) (cmucl ("cmucl" "-quiet")) (sbcl ("sbcl" "--noinform") :coding-system utf-8-unix))) ;; select the default value from slime-lisp-implementations (if (eq system-type 'darwin) ;; default to Clozure CL on OS X (setq slime-default-lisp 'ccl) ;; default to SBCL on Linux and Windows (setq slime-default-lisp 'sbcl)) (add-hook 'lisp-mode-hook (lambda () (run-hooks 'prelude-lisp-coding-hook))) (add-hook 'slime-repl-mode-hook (lambda () (run-hooks 'prelude-interactive-lisp-coding-hook))) ;; start slime automatically when we open a lisp file (defun prelude-start-slime () (unless (slime-connected-p) (save-excursion (slime)))) (add-hook 'slime-mode-hook 'prelude-start-slime) ;; Stop SLIME's REPL from grabbing DEL, ;; which is annoying when backspacing over a '(' (defun prelude-override-slime-repl-bindings-with-paredit () (define-key slime-repl-mode-map (read-kbd-macro paredit-backward-delete-key) nil)) (add-hook 'slime-repl-mode-hook 'prelude-override-slime-repl-bindings-with-paredit) (eval-after-load "slime" '(progn (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol slime-fuzzy-completion-in-place t slime-enable-evaluate-in-emacs t slime-autodoc-use-multiline-p t) (define-key slime-mode-map (kbd "TAB") 'slime-indent-and-complete-symbol) (define-key slime-mode-map (kbd "C-c i") 'slime-inspect) (define-key slime-mode-map (kbd "C-c C-s") 'slime-selector)))
- Nrepl.el for Clojure
- SLIME project page
- The birth of SLIME on the cmucl-imp mailing list (August 2003)
- SLIME presentation by Tobias Rittweiler (2008)
- Review of SLIME by Andy Wingo
- Bill Clementson's "Slime Tips and Techniques" - Part 1 (See also Part 2, Part 3, Part 4, Part 5, Part 6, and Part 7)
- Bill Clementson's "SLIME Refactoring" describes how to set up SLIME
- Bill Clementson's "Emacs Keymaps and the SLIME scratch buffer
- Bill Clementson's "CL, Music and SLIME Tutorials" contains a good SLIME tutorial
- Marco Baringer's (SLIME guru) SLIME setup
- Marco Baringer's "Editing Lisp Code with Emacs"
- The slime-devel Archives