This repository contains instructions for setting up a Common Lisp development environment with Emacs, SBCL, and SLIME.
Windows:
- Download from https://www.gnu.org/software/emacs/download.html
- Or use Chocolatey:
choco install emacs
macOS:
- Using Homebrew:
brew install emacs
- Or download from https://emacsformacosx.com/
Linux:
- Ubuntu/Debian:
sudo apt-get install emacs
- Fedora:
sudo dnf install emacs
- Arch:
sudo pacman -S emacs
Windows:
- Download from http://www.sbcl.org/platform-table.html
- Or use Chocolatey:
choco install sbcl
macOS:
- Using Homebrew:
brew install sbcl
Linux:
- Ubuntu/Debian:
sudo apt-get install sbcl
- Fedora:
sudo dnf install sbcl
- Arch:
sudo pacman -S sbcl
- Download quicklisp.lisp from https://www.quicklisp.org/beta/
- Start SBCL and run:
(load "quicklisp.lisp") (quicklisp-quickstart:install) (ql:add-to-init-file)
Method 1: Using Quicklisp (Recommended)
(ql:quickload "quicklisp-slime-helper")
Method 2: Using MELPA
- Add MELPA to your Emacs configuration
M-x package-install RET slime RET
Add to your ~/.emacs
or ~/.emacs.d/init.el
:
;; SLIME configuration
(load (expand-file-name "~/quicklisp/slime-helper.el"))
(setq inferior-lisp-program "sbcl")
- Start Emacs
- Run
M-x slime
to start the SLIME REPL - Begin writing Common Lisp code!
M-x slime
- Start SLIMEC-c C-c
- Compile current formC-c C-k
- Compile and load current fileC-c C-z
- Switch to REPL