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

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

Re: Nifty C++ features


From: Klaus Berndl
Subject: Re: Nifty C++ features
Date: 27 Jan 2004 17:47:09 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

On Tue, 27 Jan 2004, David Rasmussen wrote:

>  How do I get emacs to open the file that a variable, function or class
>  is defined in, given that it is in the current directory?
>  
>  Example:
>  
>  int main()
>  {
>     Position pos;
>     cout << pos << endl;
>  
>     Moves mvs;
>     generateMoves(pos,mvs);
>     for (int i = 0; i < mvs.size(); ++i)
>       cout << mvs[i] << " ";
> }
>  
>  I want to be able to place the cursor anywhere in the "generateMoves"
>  string, and press some keys, and then emacs should open, in a new
>  buffer, the file where generateMoves is defined.

For this you either need etags (ctags) - which is already shipped with Emacs
or the latest cedet-library (incl. semantic 2.0) which offers such
functionality too - current released beta is not perfect (AFAIK) but the
CVS-code of this library runs pretty well.

Klaus

>  
>  /David

-- 
Klaus Berndl                    mailto: klaus.berndl@sdm.de
sd&m AG                         http://www.sdm.de
software design & management    
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220


reply via email to

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