If you already have Homebrew, just open a terminal and type
$ brew install clozure-cl
or if you prefer to use sbcl
$ brew install sbcl
If you don't already have Homebrew, you should go get it.
Download the quicklisp install script. Open a terminal (or use the same one as before) and type
$ mkdir -p ~/.local/opt
to make a directory for the quicklisp installation files. Next, open your interactive lisp environment and install quicklisp:
$ ccl64 # (or sbcl if you installed that instead).
;Change the following line if it was saved somewhere else or with a different name
(load "~/Downloads/quicklisp.lisp")
(quicklisp-quickstart:install :path "~/.local/opt/quicklisp")
(ql:add-to-init-file)
(ql:quickload "quicklisp-slime-helper")
(quit) ; or (exit) if you installed sbcl
If you have never used emacs before, or you've never bothered configuring it, you probably don't have a ~/.emacs file yet. Create it by typing
$ touch ~/.emacs
Edit your ~/.emacs file and append the following:
(setq inferior-lisp-program "ccl64")
(load (expand-file-name "~/.local/opt/quicklisp/slime-helper.el"))
Again, use sbcl if you installed that instead.
If you're not used to using a text editor from the command line, you can always type
$ open ~/.emacs
which will open the configuration file in TextEdit. Just copy and paste the above code into it.
You can use emacs from the terminal, but it's not exactly user friendly. Since we have a graphical OS, we might as well take advantage of it. Download Aquamacs.
M-x slime (Press ALT+X, type slime, press enter)
M-x slime (Press ESC, type x slime, press enter)
I have a working Aquamacs + SBCL + SLIME. I wanted to install Emacs and give that a try. However, I cannot seem to get it working.
My .emacs file looks like this:
(setq inferior-lisp-program "sbcl") (load (expand-file-name "~/quicklisp/slime-helper.el"))
The init.el file is as follows:
`(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
(setq inferior-lisp-program (executable-find "sbcl"))
(load (expand-file-name "~/.local/opt/quicklisp/slime-helper.el"))`
When I run M-x: slime, I get
When I run M-x: package install slime, I get
Do you have an idea of what I am missing?