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安装。

  1. 进入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可执行文件生成。

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

修改.emacs文件为:
Emacs-24.1 + ECB-2.40 + cscope-15.7a + cedet 无root权限指定目录安装与配置Emacs-24.1 + ECB-2.40 + cscope-15.7a + cedet 无root权限指定目录安装与配置

(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")))))

View Code
5. 大功告成,重新运行emacs,尝试使用cscope、ecb等。
原文链接: https://www.cnblogs.com/yangshuo/p/3188147.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/95709

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月10日 上午3:14
下一篇 2023年2月10日 上午3:14

相关推荐