Emacs-24.1 + ECB-2.40 + cscope-15.7a + cedet 无root权限指定目录安装与配置

emacs等安装在~/INSTALL目录下,在~下新建一个INSTALL目录。

1. emacs-24.1.tar.gz ecb-2.40.tar.gz cscope-15.7a.tar.bz2下载到~/Download目录下

2. 依次执行:

  tar -zxvf emacs-24.1.tar.gz

  mv emacs-24.1 ../INSTALL

  tar -zxvf ecb-2.40.tar.gz

  mv ecb-2.40 ../INSTALL

  tar -jxvf cscope-15.7a.tar.bz2

  mv cscope-15.7a ../INSTALL

  ecb、cscope 无需make安装。

3. 进入emacs-24.1目录:cd ~/INSTALL/emacs-24.1

  依次执行:

    ./configure --prefix=$PWD (到当前目录下)

    第一次执行肯定缺少一些包,按照提示,在Synaptic Package Manager里面搜索装上。(这一步一定要保证Synaptic Package Manager 的源最新可用,否则很可能找不到包)

    多次执行configure命令并添加提示需要的包。

  所有包添加完毕后:

     依次执行:

      make

      make install

    之后在emacs-24.1目录下bin文件夹里会有emacs可执行文件生成。

4. 运行emacs后, 点options随便保存一下设置,左下角状态会显示已创建~/.emacs文件

  修改.emacs文件为: 

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;;cscope
(add-to-list 'load-path "~/INSTALL/cscope-15.7a/contrib/xcscope/")
(require 'xcscope)
;;cedet
(require 'cedet) (require 'cedet)
(global-ede-mode t)
;;;; Helper tools.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ecb-options-version "2.40")
'(semantic-default-submodes (quote (global-semantic-decoration-mode global-semantic-idle-completions-mode global-semantic-idle-scheduler-mode global-semanticdb-minor-mode global-semantic-idle-summary-mode global-semantic-mru-bookmark-mode)))
'(semantic-idle-scheduler-idle-time 3)
'(send-mail-function (quote mailclient-send-it))) (semantic-mode) ;; smart complitions
(require 'semantic/ia)
(setq-mode-local c-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
(setq-mode-local c++-mode semanticdb-find-default-throttle
'(project unloaded system recursive)) ;;;; TAGS Menu
(defun my-semantic-hook ()
(imenu-add-to-menubar "TAGS")) (add-hook 'semantic-init-hooks 'my-semantic-hook) ;;ECB
(setq stack-trace-on-error t)
(require 'semantic/analyze)
(provide 'semantic-analyze)
(provide 'semantic-ctxt)
(provide 'semanticdb)
(provide 'semanticdb-find)
(provide 'semanticdb-mode)
(provide 'semantic-load)
(add-to-list 'load-path "/home/samuel/INSTALL/ecb-2.40")
(require 'ecb)
;;ECB
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "cornsilk" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 110 :width normal :foundry "unknown" :family "DejaVu Sans Mono")))))

5. 大功告成,重新运行emacs,尝试使用cscope、ecb等。

上一篇:随手编程---快速排序(QuickSort)-Java实现


下一篇:Android Studio 安装后首次启动的 Config path ...... is invalid 问题(转)