I use Emacs with CEDET and automatically exit to complete the code. Initially, I set up CEDET to boot into Emacs every time.
However, it took quite a while, so I thought it would be wise to load it if necessary, that is - in my case - when entering C ++ - Mode.
So, I translated the original function into lambda , which is called when entering C ++ - mode:
; cscope for c(++) programming (finding symbols, etc.) (require 'xcscope) ; C++ stuff (add-hook 'c++-mode-hook (lambda () (load-file "/usr/share/emacs/site-lisp/cedet-common/cedet.el") (global-ede-mode 1) ; enable project management system (semantic-load-enable-code-helpers) ; enable prototype help and smart completion (require 'auto-complete-config) (add-to-list 'ac-dictionary-directories "~/elisp/ac-dict") (add-to-list 'ac-sources 'ac-source-semantic) (local-set-key (kbd "C-:") 'semantic-ia-complete-symbol-menu) ; set shortcut for auto completion. (local-set-key (kbd "C-.") 'ac-complete-semantic) (ac-config-default) ) )
There are no errors, but I have the following problem: when Emacs first enters C ++ mode, code completion does not work properly. But if Emacs goes into C ++ mode a second time, everything works fine.
Does anyone know what I'm doing wrong?
emacs elisp hook cedet
phimuemue
source share