tags:

views:

503

answers:

2

I recently built and installed Emacs 23.2.1 for OS X 10.6, which apparently comes with CEDET 1.0pre7 pre-installed, but my old CEDET configuration fails (for instance (semantic-load-excessive-code-helpers) or even (semantic-load-code-helpers) are undefined) even after adding the following to my .emacs:

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

What am I missing?

A: 

I removed offcial cedet package, replaced with my old cedet pachage and configuration.

fangzhzh
+4  A: 

Emacs-integrated CEDET configuration is different. This is how adapted my old configuration, untested with the add-on CEDET though:

(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))
Laurynas Biveinis
Silly me, the integrated-test-p will be of course wrong for Emacs 24.1. Anyway, you get the idea :)
Laurynas Biveinis
Exactly what I needed, thank you! How did you know to do this? Is it documented somewhere that I missed?
Michael Iatauro
I used the Emacs documentation chapter on CEDET and did some source browsing to ensure that the undefined symbols, e.g. semantic-gcc were folded into CEDET core and thus not required.
Laurynas Biveinis