在ubuntu14.04上安装和配置common lisp的开发环境(emacs)
在ubuntu12.04上安装和配置common lisp的开发环境(emacs)
一,安装最新的Emacs
1,清理旧的emacs
|
1
2
3
|
sudo apt-get updatesudo apt-get installsudo apt-get purge emacs emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex apel emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg emacs-el |
2,添加PPA:
|
1
2
|
sudo add-apt-repository ppa:cassou/emacssudo apt-get update |
3,安装emacs-snapshot
|
1
|
sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot |
或者安装emacs24
|
1
|
sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg |
二,安装 common lisp 环境
1,安装common-lisp-controller
|
1
|
sudo apt-get install common-lisp-controller |
2,安装slime
(1)先安装cvs
|
1
|
sudo apt-get install cvs |
(2) 把slime下载到/usr/bin/目录下
|
1
2
|
cd /usr/local/binsudo cvs -d :pserver:anonymous:anonymous@common-lisp.net:/project/slime/cvsroot co slime |
三,配置Emacs
把Emacs配置成便于开发的IDE,以及使其支持common lisp
1,安装Emacs插件
|
1
2
3
|
cd ~rm -rf ~/.emacs 或者 rm ~/.emacs.dgit clone https://github.com/flyingmachine/emacs-for-clojure.git ~/.emacs.d |
启动emacs,成功启动后会自动下载相关插件
2,修改emacs配置文件,使其支持common lisp
|
1
2
|
cd ~vim ~/.emacs.d/user.el |
在user.el文件底添加如下代码:
|
1
2
3
4
5
|
(setq inferior-lisp-program "/usr/bin/sbcl") (add-to-list 'load-path "/usr/local/bin/slime/") (require 'slime) (slime-setup)(slime-setup '(slime-fancy)) |
解释:
inferior-lisp-program 默认的是“/usr/bin/sbcl”;
add-to-list 'load-path 是slime的加载路径。
四,测试开发环境
启动emacs,按alt+x ,输入slime,如果成功会显示如下:

浙公网安备 33010602011771号