>>> "Eric M. Ludlam" <eric@...> seems to think that:
>>>> Gerdin Tobias <Tobias.Gerdin@...> seems to think that:
[ ... ]
>>> There is a way to get the definition of a class, and that is
>>>via the "brutish" search. Getting that to work requires
>>>parsing every file in your project. There are likely clever
>>>ways to get it to associate a header file with some group of C
>>>files, but that would not be reliable.
[ ... ]
>I tried my hand at go-to-definition this morning, and I came up with
>the attached fcn. Sadly, my version depends on a semanticdb API I
>haven't finished checking in yet, so I put in a hack to make it work
>w/out. As the todo comment also suggests, there is the potential for
>confusion if you use the same name a lot, so this needs some work.
>(defun senator-jump-to-definition ()
> "Jump to the definition of the tag under point.
>This does not jump to the symbol the cursor is on, but the entire
>tag (function, type, etc)."
> (let ((tg (senator-current-tag)))
[ ... ]
The function I gave above might work well for plain functions, and
sometimes work for methods, but I found that calculating an accurate
match of where to jump to was surprisingly complex. Like, way
Now in CVS, there is `semantic-analyze-refs.el' for trying to analyze
all these references accurately when classes and namespaces are
The simple seeming function `semantic-analyze-proto-impl-toggle' will
bounce between an implementation and a prototype. I bound it to F8
for a while, and found it fast in my test directories. I haven't
tried it on a real code base.
Give it a try, and let me know how it goes. There is yet a lot of
room for speed optimizations here, so exercising it is the first step.
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net