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