emacs - 为 GNU Emacs 23.2.1 配置 CEDET

标签 emacs cedet

我最近为 OS X 10.6 构建并安装了 Emacs 23.2.1,它显然预装了 CEDET 1.0pre7,但我的旧 CEDET 配置失败(例如 (semantic-load-excessive-code-helpers) 甚至 (semantic-load-code-helpers) 未定义)即使在添加以下内容后到我的 .emacs:

(require 'cedet)
(semantic-mode 1)
(require 'semantic)

我错过了什么?

最佳答案

Emacs 集成的 CEDET 配置不同。这是如何适应我的旧配置,但未使用附加 CEDET 进行测试:

(setq integrated-cedet-p (and (>= emacs-major-version 23)
                              (>= emacs-minor-version 2)))

(unless integrated-cedet-p
  (progn
    (setq cedet-lib "/path/foo")
    (setq cedet-info-dir "/path/bar")))

(if (boundp 'cedet-info-dir)
    (add-to-list 'Info-default-directory-list cedet-info-dir))

(if (boundp 'cedet-lib)
    (load-file cedet-lib))

(semantic-mode 1)

(global-ede-mode t)

(if (boundp 'semantic-load-enable-excessive-code-helpers)
    ; Add-on CEDET
    (progn
      (semantic-load-enable-excessive-code-helpers)
      ; TODO: should already be enabled by previous line
      (global-semantic-idle-completions-mode)
      (global-semantic-tag-folding-mode))
   ; Integrated CEDET
  (setq semantic-default-submodes
        '(global-semanticdb-minor-mode
          global-semantic-idle-scheduler-mode
          global-semantic-idle-summary-mode
          global-semantic-idle-completions-mode
          global-semantic-decoration-mode
          global-semantic-highlight-func-mode
          global-semantic-stickyfunc-mode)))

(if (boundp 'semantic-ia) (require 'semantic-ia))
(if (boundp 'semantic-gcc) (require 'semantic-gcc))

关于emacs - 为 GNU Emacs 23.2.1 配置 CEDET,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3445248/

相关文章:

c++ - Emacs CEDET 语义完成 "cannot find types for ..."

java - 如何在 Emacs 中将外部标签文件添加到 CEDET 中

Emacs:有没有办法我可以获得自定义标签列表 - 并通过它们导航?

emacs - 如何使用 Emacs 模式行修复这种随机行为?

emacs - 是否可以在 Emacs 中设置每个模式/缓冲区和每个字符集的字体?

emacs - "Invalid read syntax: )"

emacs - CEDET 语义分析器在其他快速系统上相当慢

emacs - [cedet] : how to add a new ede target?

启动时 Emacs 自动完成模式

emacs - 在 Windows 和 WSL 之间共享文件夹