一,安装最新的Emacs
1,清理旧的emacs
sudo apt-get update
sudo apt-get install
sudo 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:
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
3,安装emacs-snapshot
sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot
或者安装emacs24
sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg
二,安装 common lisp 环境
1,安装common-lisp-controller
sudo apt-get install common-lisp-controller
2,安装slime
(1)先安装cvs
sudo apt-get install cvs
(2) 把slime下载到/usr/bin/目录下
cd /usr/local/bin
sudo cvs -d :pserver:anonymous:anonymous@common-lisp.net:/project/slime/cvsroot co slime
三,配置Emacs
把Emacs配置成便于开发的IDE,以及使其支持common lisp
1,安装Emacs插件
cd ~
rm -rf ~/.emacs 或者 rm ~/.emacs.d
git clone https://github.com/flyingmachine/emacs-for-clojure.git ~/.emacs.d
启动emacs,成功启动后会自动下载相关插件
2,修改emacs配置文件,使其支持common lisp
cd ~
vim ~/.emacs.d/user.el
在user.el文件底添加如下代码:
(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,如果成功会显示如下:
参考:
http://www.braveclojure.com/basic-emacs/
http://www.cnblogs.com/wsecurity/p/3283082.html
http://www.cnblogs.com/cute/archive/2011/08/16/2140530.html
http://rannger.blog.163.com/blog/static/201567223201202214823562/
来源:oschina
链接:https://my.oschina.net/u/1418902/blog/183154