Etags swoops in to ur rescue...
etags is basically a utility which generates tags for each function or data definition.
eg. a function declaration fun() would yeild "fun" as a tag. The corresponding file name and the offset at which the definition can be found is recorded in the file TAGS. TAGS is used by Emacs editor to simulate hyperlinks for tokens.
In simple language, if you come across a function and wonder how it is coded... just move the cursor over the function name and press M-. (M= meta key... usually ALT)... and voila!
The simplest way to browse a code !!
wanna go back to where you were... no probs... M-* and there you are !!
Linux continues to amaze me!!
For kernel source code :
go to /usr/src/linux-[version]
login as su.. nd type in "make TAGS"...
For your own directory tree:
this is a bit clumsy since etags dosen't support nested directories... etags searches for specified files ONLY in the current directory... so.. the roundabout way is :
go to the root of your directory tree and type in
$ find . -name "*.[chCH]" -print | etags -
what it does is... the find command returns all the filenames of .c and .h extension and this output is piped to etags command (the hyphen after etags directs etags to use standard output as its input)...
now that i see what linux editors can do... notepad suddenly appears soo lame !!:)