一,安裝最新的Emacshtml
1,清理舊的emacsgit
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:github
sudo add-apt-repository ppa:cassou/emacs sudo apt-get update
3,安裝emacs-snapshotvim
sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot
或者安裝emacs24bash
sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg
二,安裝 common lisp 環境
測試
1,安裝common-lisp-controller
ui
sudo apt-get install common-lisp-controller
2,安裝slimespa
(1)先安裝cvs
.net
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/