我最近为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)
我错过了什么?
答案 0 :(得分:17)
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))