* emacs C++ auto code completion problem
@ 2009-05-25 17:08 GMS S
0 siblings, 0 replies; 4+ messages in thread
From: GMS S @ 2009-05-25 17:08 UTC (permalink / raw)
To: help-gnu-emacs
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs C++ auto code completion problem
[not found] <mailman.7830.1243346544.31690.help-gnu-emacs@gnu.org>
@ 2009-05-26 15:55 ` Richard Riley
2009-05-26 18:30 ` Alan Mackenzie
[not found] ` <mailman.7843.1243362567.31690.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Richard Riley @ 2009-05-26 15:55 UTC (permalink / raw)
To: help-gnu-emacs
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs C++ auto code completion problem
2009-05-26 15:55 ` Richard Riley
@ 2009-05-26 18:30 ` Alan Mackenzie
[not found] ` <mailman.7843.1243362567.31690.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2009-05-26 18:30 UTC (permalink / raw)
To: Richard Riley; +Cc: help-gnu-emacs
Hi, Richard!
On Tue, May 26, 2009 at 05:55:18PM +0200, Richard Riley wrote:
> GMS S <gmspro@yahoo.com> writes:
> 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)
> `----
Please don't do this! In some CC Modes (C++ Mode, Java Mode, ...), ">"
is bound to `c-electric-lt-gt', which deals with all sorts of nasty
things that happen when ">" is a template bracket, or might be one.
(Don't blame me for the stupidity/malice of the idiots who thought that
the greater-than sign was so pretty it could be abused as a parenthesis,
leading to syntactically unparseable code.)
Please be careful when rebinding "ordinary" keys. Particularly in CC
Mode, quite a lot of ordinary looking keys are actually "electric" keys.
> 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
Hmm. You have an illicit '(local-set-key "\C-c\C-r" ...' in that file.
C-c C-<letter> belongs to the major mode. You _probably_ meant to use
C-c r. :-)
> 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/
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs C++ auto code completion problem
[not found] ` <mailman.7843.1243362567.31690.help-gnu-emacs@gnu.org>
@ 2009-05-27 2:18 ` Richard Riley
0 siblings, 0 replies; 4+ messages in thread
From: Richard Riley @ 2009-05-27 2:18 UTC (permalink / raw)
To: help-gnu-emacs
Alan Mackenzie <acm@muc.de> writes:
> Hi, Richard!
>
> On Tue, May 26, 2009 at 05:55:18PM +0200, Richard Riley wrote:
>> GMS S <gmspro@yahoo.com> writes:
>
>> 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)
>> `----
>
> Please don't do this! In some CC Modes (C++ Mode, Java Mode, ...), ">"
> is bound to `c-electric-lt-gt', which deals with all sorts of nasty
I didn't. Please see the link above!
> things that happen when ">" is a template bracket, or might be one.
> (Don't blame me for the stupidity/malice of the idiots who thought that
> the greater-than sign was so pretty it could be abused as a parenthesis,
> leading to syntactically unparseable code.)
>
> Please be careful when rebinding "ordinary" keys. Particularly in CC
> Mode, quite a lot of ordinary looking keys are actually "electric"
> keys.
>
>> 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
>
> Hmm. You have an illicit '(local-set-key "\C-c\C-r" ...' in that file.
> C-c C-<letter> belongs to the major mode. You _probably_ meant to use
> C-c r. :-)
Possibly :-;
>
>> 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/
--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-27 2:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-25 17:08 emacs C++ auto code completion problem GMS S
[not found] <mailman.7830.1243346544.31690.help-gnu-emacs@gnu.org>
2009-05-26 15:55 ` Richard Riley
2009-05-26 18:30 ` Alan Mackenzie
[not found] ` <mailman.7843.1243362567.31690.help-gnu-emacs@gnu.org>
2009-05-27 2:18 ` Richard Riley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).