Emacs imenu 与 cedet 代码自动完成集成
您好,我无法将 imenu 与 CEDET 代码完成集成。当我调用自动完成功能时出现的是另一个包含可能单词的缓冲区。
我的 .emacs 文件:
(require 'color-theme)
(color-theme-initialize)
(color-theme-blue-mood)
;; Load CEDET
(load-file "/home/user/cedet-1/common/cedet.el")
(global-ede-mode 1) ; Enable the Project management system
(semantic-load-enable-code-helpers) ; Enable prototype help and smart completion
(global-srecode-minor-mode 1) ; Enable template insertion menu
;; control + space
(global-set-key [?\C- ] 'semantic-complete-analyze-inline)
(load-library "completion")
(global-set-key (kbd "C-.") 'complete)
(defun my-semantic-hook ()
(imenu-add-to-menubar "TAGS"))
(add-hook 'semantic-init-hooks 'my-semantic-hook)
Hi I can't integrate the imenu with the CEDET code completion. what appears when I invoke auto-completion is another buffer with the possible words.
My .emacs file:
(require 'color-theme)
(color-theme-initialize)
(color-theme-blue-mood)
;; Load CEDET
(load-file "/home/user/cedet-1/common/cedet.el")
(global-ede-mode 1) ; Enable the Project management system
(semantic-load-enable-code-helpers) ; Enable prototype help and smart completion
(global-srecode-minor-mode 1) ; Enable template insertion menu
;; control + space
(global-set-key [?\C- ] 'semantic-complete-analyze-inline)
(load-library "completion")
(global-set-key (kbd "C-.") 'complete)
(defun my-semantic-hook ()
(imenu-add-to-menubar "TAGS"))
(add-hook 'semantic-init-hooks 'my-semantic-hook)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不完全确定您在问什么,但我猜当您选择
C-SPC
时,您希望弹出一个菜单吗?代码完成引擎使用一堆不同的完成输出机制,但菜单不是其中之一,因为 Emacs 菜单系统会抓住焦点并阻止进一步键入。如果您只想要一个菜单,那么您应该将C-SPC
绑定到semantic-ia-complete-symbol-menu
。Imenu 是一个在菜单中显示缓冲区中所有标签的工具。补全是一个系统,Emacs 通过该系统提供了一个可能的单词列表来完成某些符号。它们与唯一的例外无关,即当完成提示使用 Imenu 的标签收集机制时,CEDET 不会启用该功能。
I'm not entirely sure what you are asking, but I'll guess that when you select
C-SPC
, you expect a menu to pop up? The code completion engine uses a bunch of different completion output mechanisms, but a menu isn't one of them because the Emacs menu system grabs focus, and prevents further typing. If you just want a menu, then you should bindC-SPC
tosemantic-ia-complete-symbol-menu
instead.Imenu is a tool that shows all tags in a buffer in a menu. Completion is a system by which Emacs provides a list of possible words that will complete some symbol. They are not related with the sole exception of when Imenu's tag collection mechanism is used by by a completion prompt, which CEDET does not enable.