help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: RE: [h-e-w] c++ editing , variable name completion]


From: john ware
Subject: [Fwd: RE: [h-e-w] c++ editing , variable name completion]
Date: Wed, 24 Jul 2002 11:04:00 -0600
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0rc2) Gecko/20020510

 Paul,
Being a long time user of JDEE, I am looking for the completion functionality which it provides when I work in C++. I will look forward to the package you mention below.
I'm sure it will be a fine tool.

john

-------- Original Message --------
Subject: RE: [h-e-w] c++ editing , variable name completion
Date: Wed, 24 Jul 2002 02:09:19 -0400
From: Paul Kinnucan <address@hidden>
To: Jeremy Bowen <address@hidden>
CC: emacshelp <address@hidden>
References: <address@hidden>



Jeremy Bowen writes:
> From: john ware [mailto:address@hidden
> Sent: 22 July 2002 19:33
> > > Hi, > > Is there a mode which will perform variable name and function name > > completion for C++.
> >
> > By this I mean, if you type in the the beginning of a variable name > > and hit the proper key combination then a list of all possible symbols > > which are valid in the scope are displayed. I know that the JDEE mode > > will do this for java code, but alas, I am back working with C++. > > I quite like dabbrev mode. Look in Info under the topic "Emacs->Abbrevs" > > It doesn't "display" all completions but it does cycle through the > available ones it knows about. It is very light-weight but this might be > good enough. > > I think it works out of the box. You can try it with simply M-/ after > typing the first few letters of the variable/function name. >
I cringe whenever I read a post recommending dabbrev as Emacs' answer
to Microsoft's Intellisense completion facility. Anyone who has used
Intellisense or the equivalent facilities provided by Java IDEs,
including the JDEE, and who tries dabbrev, is going to be disappointed
and get the impression that Emacs users work in the backwaters of
their profession blissfully unaware that the rest of the world has
passed them by when it comes to programming tools. Better to frankly
admit that Emacs is deficient in this area.

Comparing dabbrev to Intellisense is like comparing a brain-damaged
nonprogrammer having only short-term memory to a programmer with total
recall and a complete command of C++ syntax and the fields and methods
of all classes used in the current project including the class of
the object at point. dabbrev only "knows" how to complete symbols
in open buffers (i.e., in memory). It blindly cycles through every
symbol in memory that might complete the text at point, regardless of
context. If the symbol you want to complete is not in memory, you're
out of luck. Further, if you ask dabbrev to complete obj.getFo and
there is a symbol called getFoo in memory, dabbrev will offer getFoo
as a completion even if the class of obj has no such method. This is
very far from the kind of syntax-, context-, and type-aware method and
field completion that the JDEE provides for Java or Microsoft's
Intellisense facility provides for C++.

Eric Ludlam and I are working on providing a true syntax-, context,
and type-aware field and method completion facility for C++, Java, C
and other languages, using parse databases generated by
Eric's semantic package. We hope to have it ready for at least
C, C++, and Java in the very near future.

- Paul

> Hope this helps
>







reply via email to

[Prev in Thread] Current Thread [Next in Thread]