Collection of Emacs Development Environment Tools (CEDET) 的安裝與使用
ECB是emacs的增強工具,她可以提供更加完善的開發環境。
一、下載
ECB是CEDET工具包中的一項,可以從以下地址下載:
http://sourceforge.net/projects/ecb/
他還需要其她幾個軟體包
speedbar
eieio
semantic
:
http://sourceforge.net/projects/cedet/
將這幾個軟體包解壓到emacs的目錄下,我的emacs配置目錄為
/usr/local/share/emacs/21.1/
site-lisp/
ecb
speedbar
eieio
semantic
然後進行配置,順序為:speedbar eieio semantic ecb
二、配置
1.speedbar配置
在site-lisp/subdirs.el中加入
(add-to-list 'load-path "/path/speedbar")
我的為:
(add-to-list 'load-path "/usr/local/share/emacs/speedbar")
然後加入:
(autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
(autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
(global-set-key [(f4)] 'speedbar-get-focus)
如果你用Emacs,加入:
(define-key-after (lookup-key global-map [menu-bar tools])
[speedbar] '("Speedbar" . speedbar-frame-mode) [calendar])
如果你用XEmacs,加入:
(add-menu-button '("Tools")
["Speedbar" speedbar-frame-mode
:style toggle
:selected (and (boundp 'speedbar-frame)
(frame-live-p speedbar-frame)
(frame-visible-p speedbar-frame))]
"--")
;; Texinfo fancy chapter tags
(add-hook 'texinfo-mode-hook (lambda () (require 'sb-texinfo)))
;; HTML fancy chapter tags
(add-hook 'html-mode-hook (lambda () (require 'sb-html)))
(autoload 'rpm "sb-rpm" "Rpm package listing in speedbar.")
;; w3 link listings
(autoload 'w3-speedbar-buttons "sb-w3" "s3 specific speedbar button
generator.")
XEmacs Emacs 20.2版本以前的加入:
;; chapter listings
(autoload 'Info-speedbar-buttons "sb-info" "Info specific speedbar
button generator.")
;; folder listings
(autoload 'rmail-speedbar-buttons "sb-rmail" "Rmail specific speedbar
button generator.")
;; current stack display
(autoload 'gud-speedbar-buttons "sb-gud" "GUD specific speedbar button
generator.")
以後的加入
(eval-after-load "info" '(require 'sb-info))
2.eieio 配置
在site-lisp/subdirs.el中加入
(add-to-list 'load-path "/path/eieio")
我的為:
(add-to-list 'load-path "/usr/local/share/emacs/eieio")
3.semantic 配置
在site-lisp/subdirs.el中加入
(add-to-list 'load-path "/path/to/semantic")
(setq semantic-load-turn-everything-on t)
我的為:
(add-to-list 'load-path "/usr/local/share/emacs/semantic")
(setq semantic-load-turn-everything-on t)
4.ecb 配置
在site-lisp/subdirs.el中加入
(add-to-list 'load-path "/path/ecb")
我的為:
(add-to-list 'load-path "/usr/local/share/emacs/ecb")
在~/.emacs中加入
(require 'ecb)
三、使用
M-x ecb-activate 啟用ECB
M-x ecb-show-help 查看協助
四、其它
如果你想加速這些程式的執行,那麼就要將EL檔案編譯成ELC檔案。
查看相應程式的Makefile檔案,修改LOADPATH變數,然後make即可