[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs C++ auto code completion problem
From: |
Richard Riley |
Subject: |
Re: emacs C++ auto code completion problem |
Date: |
Tue, 26 May 2009 17:55:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux) |
GMS S <gmspro@yahoo.com> writes:
> Hi,
> The C++ auto code completion is not working with emacs.
> Reading this http://cedet.sourceforge.net/setup.shtml
>
> make EMACS=emacs
>
> And added in .emacs file
>
> (load-file "~/cedet-1.0pre6/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
>
> But it is not working.
> If I run a .cpp file with emacs and after typing dot(.) no menu is shown.
>
> Would someone please tell where is the mistake?
>
>
>
>
>
>
>
Did you read
http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html ?
Specifically
,----
| (defun my-c-mode-cedet-hook ()
| (local-set-key "." 'semantic-complete-self-insert)
| (local-set-key ">" 'semantic-complete-self-insert))
| (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)
`----
I used company-mode as it has far better search and context help for
completion candidates. To use the semantic functions simply comment out
the "(company-mode 1") in the my-cedet-hook in the code below.
My own set up is here:
http://richardriley.net/projects/emacs/dotprogramming#sec-1.1
But borrowed heavily from Alex Ott's excellent article (I struggle
with the CEDET docs as they cover an awful lot of things I haven't a
clue about!).
Company mode:
http://nschum.de/src/emacs/company-mode/