用 Emacs+ecb 后 +cedet阅读代码

1、安装 ecb  的方法:
    A、 下载地址:    
    cscope-15.5.tar.gz    http://sourceforge.net/projects/cscope

    ecb-2.32.tar.gz          http://sourceforge.net/projects/ecb
   
    其中ecb还需要另外三个包:eieio,semantic,speedbar,地址是

        http://sourceforge.net/projects/cedet

    B、安装ecb和三个支持包:

    #cd /usr/share/emacs/site-lisp
    #tar zxfv ecb-2.32.tar.gz
    #tar zxfv eieio-0.17.tar.gz
    #tar zxfv semantic- 1.4.4 .tar.gz
    #tar zxfv speedbar-0.14beta4.tar.gz  

做四个连接

ln -s ecb-2.32 ecb

ln -s eieio-0.17 eieio

ln -s semantic- 1.4.4 semantic

ln -s speedbar-0.14beta4 speedbar

 

然后修改site-start.el文件,若在site-lisp目录下面没有此文件,可以新建。添加以下五行

(setq load-path (append load-path '("/usr/share/emacs/site-lisp/eieio")))

(setq load-path (append load-path '("/usr/share/emacs/site-lisp/semantic")))

(setq load-path (append load-path '("/usr/share/emacs/site-lisp/speedbar")))

(setq load-path (append load-path '("/usr/share/emacs/site-lisp/ecb")))

(require 'ecb)

 

重新启动一下emacs,执行M-x ecb-activate。哈哈,屏幕的左边出现了ecb的几个分栏窗口,从上到下依次是目录树、当前文件所在目录、变量和函数、历史。

 

C、安装cscope

$tar zxfv cscope-15.5.tar.gz

$cd cscope-15.5

$./configure && make && make install

然后把contrib/xcscope/目录下的cscope-indexer复制到PATH目录比如/usr/local/bin,把xcscope.el复制到/usr/share/emacs/site-lisp。修改/usr/share/emacs/site-lisp/site-start.el,添加(require 'xcscope)

至此,整个过程就完全完成了,现在可以在emacs下面高效地读源码了。


2.在配制文件 .emacs中加上

;; Load CEDET
    (load-file "/home/Harrison/Emacs/cedet-1.0pre4/common/cedet.el")

;; Enabling various SEMANTIC minor modes.  See semantic/INSTALL for more ideas.
;; Select one of the following:

;; * This enables the database and idle reparse engines
 (semantic-load-enable-minimum-features)

;; * This enables some tools useful for coding, such as summary mode
;;   imenu support, and the semantic navigator
 (semantic-load-enable-code-helpers)

;; * This enables even more coding tools such as the nascent intellisense mode
;;   decoration mode, and stickyfunc mode (plus regular code helpers)
(semantic-load-enable-guady-code-helpers)
;; * This turns on which-func support (Plus all other code helpers)
;; (semantic-load-enable-excessive-code-helpers)
;; This turns on modes that aid in grammar writing and semantic tool
;; development.  It does not enable any other features such as code
;; helpers above.
semantic-load-enable-semantic-debugging-helpers)


不知道什么原因,ecb和cedet不能同时使用。请高手指点!

ecb于cedet可以共存了,就是要先加载cedet,再加载ecb就好了。不过有个问题,ecb的函数列表有时会没有内容。(20071010)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值