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))
愚蠢的是,集成测试-P当然是Emacs 24.1错误。无论如何,你明白了:) – 2010-08-10 11:55:12
正是我需要的,谢谢!你怎么知道这样做?它是否记录在某处我错过了? – 2010-08-10 15:05:30
我在CEDET上使用了Emacs文档章节,并做了一些源浏览以确保未定义的符号语义gcc被折叠成CEDET核心,因此不是必需的。 – 2010-08-11 02:08:53