Search code examples
emacscedet

disable cedet/semantic code completion for lisp mode


I've set up cedet/semantic code completion for my c++ projects (using this tutorial: http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html) but do not want the or all the helpers it (automagically it seems to me) offers in lisp mode.

So, my question is how to disable them in lisp-mode or have them enabled in c++-mode only.

Thanks, Rene.


Solution

  • I think, that you need to slightly change config that is in the article - there are many global modes are used there, for example:

    (global-srecode-minor-mode 1)
    (global-semantic-mru-bookmark-mode 1)
    

    etc. you can enable corresponding semantic-mru-bookmark-mode, srecode-minor-mode, etc. in the common C mode hook, like:

    (defun my-c-mode-cedet-hook ()
      (semantic-mru-bookmark-mode 1)
      ;; .....
      )
    (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)
    

    Or disable these modes for Lisp only... The other modes include semantic-auto-parse-mode, semantic-idle-summary-mode, semantic-idle-scheduler-mode - you can get this list using M-x apropos semantic.*mode

    And the main thing here - you need to use semantic-load-enable-minimum-features in your config to enable minimal number of features by default, and enable other necessary features only in C/C++ mode hook...