为 GNU Emacs 23.2.1 配置 CEDET

发布于 2024-09-13 09:58:16 字数 314 浏览 4 评论 0原文

我最近为 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)

我缺少什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

享受孤独 2024-09-20 09:58:16

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

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))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文