【问题标题】:Configuring CEDET for GNU Emacs 23.2.1为 GNU Emacs 23.2.1 配置 CEDET
【发布时间】:2010-08-10 00:49:28
【问题描述】:

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

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

我错过了什么?

【问题讨论】:

    标签: emacs cedet


    【解决方案1】:

    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))
    

    【讨论】:

    • 真傻,Integrated-test-p 对于 Emacs 24.1 来说当然是错误的。无论如何,你明白了:)
    • 正是我需要的,谢谢!你怎么知道要这样做?它是否记录在我错过的某个地方?
    • 我使用了 CEDET 上的 Emacs 文档章节并进行了一些源代码浏览以确保未定义的符号,例如语义 gcc 被折叠到 CEDET 核心中,因此不需要。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多