码迷,mamicode.com
首页 > 系统相关 > 详细

emacs环境配置

时间:2017-05-25 14:50:35      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:exe   chm   figure   nbsp   mod   数据库   百度   index   建立   

    Cscope:   

    首先官网上下载cscope的源码包,解压进入,按照INSTALL的说明:

./configure

make

make install

    但是在make时报如下错误:fatal error: curses.h: No such file or directory

    百度了下,是字符界面的库ncurses,需要安装开发包:

yum install ncurses-devel ncurses

    安装完毕后编译安装成功。借着将源码包中的xcscope.el拿出来放到emacs的插件目录下cscope文件夹中,并在.emacs中添加引用:

(add-to-list ‘load-path "~/.emacs.d/plugin/xcscope")

;;打开C文件时加载cscope

(add-hook ‘c-mode-common-hook

                ‘(lambda()

                   (require ‘xcscope)))

    然而这还不够。将源码包中的cscope-indexer拷贝到/usr/bin目录下(系统PATH),并添加执行权限:

chmod +x cscope-indexer

    最后,打开emacs,C-c s I,建立索引文件数据库成功。

emacs环境配置

标签:exe   chm   figure   nbsp   mod   数据库   百度   index   建立   

原文地址:http://www.cnblogs.com/Jackie-Snow/p/6903397.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!