【发布时间】:2013-02-24 18:31:24
【问题描述】:
我希望每次打开 .cpp 文件时,语义标签折叠都会被激活。我正在使用最新版本的 cedet(正在加载 cedet-devel-load.el)。我有
(semantic-mode 1)
(require 'semantic/ia)
(require 'semantic/bovine/gcc)
(load-file "path/to/semantic/tag/folding/semantic-tag-folding.el")
(require 'semantic-tag-folding)
我添加了一个钩子
(add-hook 'c-mode-common-hook 'setupcpp)
在 'setupcpp 我只是有
(defun setupcpp ()
(interactive)
(semantic-tag-folding-mode t))
这之后在我的 .emacs 中没有发生任何与 cedet/语义相关的事情。事实上,我可以把它作为我的 .emacs 的唯一内容。
它不起作用。打开 .cpp 文件时,我收到消息文件模式规范错误:(错误“缓冲区 foo.cpp 无法按语义折叠”)。
奇怪的是,如果打开文件后,我执行 M-x semantic-tag-folding-mode,它就可以了!我只是迷路了。
【问题讨论】:
标签: emacs lisp elisp emacs24 cedet