Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs: is there a semantic-jump-to-declaration (using semantic.el)?

Tags:

c

emacs

Suppose I am editing a buffer containing C code.

I have started semantic with semantic-load-enable-code-helpers .

I have point placed on the name of a function . If I then invoke senator-jump I can jump to the place where that fn is first declared, in that module. If there is an extern declaration in that module, then it goes to that extern statement. Sometimes? Sometimes it doesn't work, though.

There is also semantic-ia-fast-jump, which jumps to the first declaration, also. I'm not sure how this fn differs from senator-jump. This one actually works all the time, though, for functions defined in the local buffer.

What if it the function I want to jump to, is an extern? Is it possible to use senator to jump to the definition of the fn, if that definition resides in a separate module? Isn't EDE supposed to do something like this?

Thanks.

like image 803
Cheeso Avatar asked May 07 '10 16:05

Cheeso


1 Answers

Look to the semantic-ia-fast-jump function, defined in semantic-ia. For C & C++ it's also good idea to generate database with gtags from GNU Global - CEDET has support for it.

P.S. I just checked - it jumped from my source to declaration of std::string in /usr/include/....

like image 124
Alex Ott Avatar answered Oct 16 '22 10:10

Alex Ott