Finding where varables have been declared in what file?
GNU Emacs 23.1.1
I am maintaining someones code. There are many files and directories for the 开发者_开发问答headers and source files.
I am wondering if there is a easy way to use emacs that when I highlight a variable name I can go straight to where it is declared?
Some of the structures I am working in are declared in other header files, rather than go searching for them, I just want to be taken straight to them.
Many thanks for any suggestions,
Look into the etags
command which builds a tags database. Once the tag DB is built and loaded, you can use M-.
on any keyword to jump directly to the definition.
It's also pretty easy to hit C-h v RET on the variable name, to get its *Help*
, then hit RET (or click) the file-name link to get to the source definition.
精彩评论