emacs
sudo apt-get install emacs
sbcl
clisp在shell界面使用方便,但是clisp不支持多线程,而且clisp安装后的asdf版本低,所以选择了sbcl.sbcl也是slime默认的lisp实现.
sudo apt-get install sbcl
slime
从github下载源代码,安装slime
apple@example:~$ cd .emacs.d/
apple@example:~/.emacs.d$ mkdir lisp
apple@example:~/.emacs.d$ cd lisp
apple@example:~/.emacs.d/lisp$ git clone https://github.com/slime/slime.git
编辑emacs启动文件,做下面3件事
- 把slime源文件位置加入到load-path
- 设置slime使用sbcl
- 加载slime
(dolist (p '("~/.emacs.d/lisp/" "~/.emacs.d/lisp/slime")) (push p load-path))
(setf inferior-lisp-program "/usr/bin/sbcl")
(setq slime-contribs '(slime-fancy))
(require 'slime)
启动emacs,运行slime
M-x slime
quicklisp
把quickload-bootstrap代码clone在common-lisp目录里
apple@example:~$ cd common-lisp/
apple@example:~/common-lisp$ git clone https://github.com/blackspace/quicklisp-bootstrap
进入sbcl,安装quicklisp
apple@apple-System:~$ sbcl
*(load #P"~/common-lisp/quicklisp-bootstrap/quicklisp.lisp")
* (quicklisp-quickstart:install)
如果网络下载要通过cdn,需要下面步骤,因为quicklisp没有考虑到这个情况:
apple@example:~$ cd common-lisp/
apple@example:~/common-lisp$ git clone https://github.com/blackspace/quicklisp-client.git
apple@example:~$ cd quicklisp/
apple@example:~/quicklisp$ rm quicklisp/ -rf
apple@example:~/quicklisp$ ln -s ~/common-lisp/quicklisp-client/quicklisp/ .
一切ok