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