Configuring CEDET for GNU Emacs 23.2.1
Asked Answered
P

1

12

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?

Pilch answered 10/8, 2010 at 0:49 Comment(0)
R
17

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))
Ricardaricardama answered 10/8, 2010 at 2:57 Comment(3)
Silly me, the integrated-test-p will be of course wrong for Emacs 24.1. Anyway, you get the idea :)Ricardaricardama
Exactly what I needed, thank you! How did you know to do this? Is it documented somewhere that I missed?Pilch
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.Ricardaricardama

© 2022 - 2024 — McMap. All rights reserved.