emacs - 导航上的路径配置 By cedet

标签 emacs cedet

我想使用 cedet 在我的程序中导航。我使用 semantic-ia-fast-jump 跳转到声明,使用 semantic-analyze-proto-impl-toggle 跳转到实现。我发现这两个命令需要同一目录中的文件。所以我需要将所有目录添加到搜索路径中。我指的是一个来自互联网的人。代码如下:

(setq semanticdb-project-roots (list (expand-file-name "~/")))    
(defconst cedet-user-include-dirs    
  (list "~/samuel/project/modules/MManage/inc"    
        "~/samuel/project/modules/MManage/src"    
        ...
   ))    
(require 'semantic-c nil 'noerror)    
(let ((include-dirs cedet-user-include-dirs))    
  (mapc (lambda (dir)    
         (semantic-add-system-include dir 'c++-mode)    
         (semantic-add-system-include dir 'c-mode))    
          include-dirs))        

我有几个模块,所以我需要添加很多目录。它不方便也不便携。我认为这一定是一个很好的配置方法。

PS:引用http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html#sec6
我的设置如下

    (ede-cpp-root-project "library_samuel"
:name "library_samuel project"
:file (expand-file-name "~/samuel/project_self/library_samuel/CMakeLists.txt")
:include-path '("/common/include"  "/modules/MManage/inc" "/modules/ImageProcess/inc" )
:spp-table '(("BUILD_APP" . "")))

semantic-ia-fast-jump 可以很好地工作,但 semantic-analyze-proto-impl-toggle 不能工作。看来头文件和源文件必须在同一目录中。如何解决这个问题。

最佳答案

最好设置项目(例如,查看 my article on CEDET )。在项目内部,您可以使用 include-path 指令引用相对路径

关于emacs - 导航上的路径配置 By cedet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11879449/

相关文章:

emacs - 建议emacs交互功能: before

emacs - 如何嵌套各种 `propertize` s?

emacs - 在 Emacs24 + CEDET 中突出显示局部变量、对象属性和常量

emacs - 为 GNU Emacs 23.2.1 配置 CEDET

emacs - CEDET:手动存储标签

c++ - Emacs CEDET Semantic 没有自动完成 `this` 关键字。 (C++)

ruby - Tab 键在 Emacs ruby​​ 模式下不起作用

r - Emacs,R,Sweave : UTF-8 encoding is not recognized when launching Sweave through Emacs

emacs - 如何在指定的主要模式下禁用全局次要模式

emacs - 使 emacs 语义自动完成提示 "always on"