It's great that emacs has a built-in help system, which you can invoke by [control-h a] if you need to search some feature by words in description. If you know a function by name, you can just type [control-h f] with the cursor at the function name while you are editing your elisp code, or you can specify a function name at the help function prompt. In any case, if the system finds a function, the description shows up. (Try [control-h ?] for more ways to make use of the help system...)
Also you can refer to implementations (elisp or c code) by [ESC x find-function]. To be able to view c source code, you need to set up a local source code directory, i.e. set the following variable:
There are many pages that shows how to do it, but I couldn't find a description on a emacs document, so here I just say the variable and the use is defined in find-func.el:
This time, I decided to set up my own emacs environment which I can mess around with. So I started from here, after searching for the source code repository:
Following the instruction, I branched from the repository with the command:
bzr branch bzr://bzr.savannah.gnu.org/emacs/trunk
A directory named "trunk" is created and directories and files are copied from the directory.
Now it's pretty straight forward to build your own emacs. Files like INSTALL, INSTALL.BZR, and README are well-written, so probably you wouldn't have much trouble to complete the process.
As for me, I built emacs on a Debian box, and I needed to install some libraries like libxpm, but you just need to look at the error/warning messages to figure out what needs to be done optionally. You also need autotools if you don't have them installed yet on your system. Later I might go into details if I have a chance and feel like to... Once again, the process is well-documented and it shouldn't be of much trouble to try by yourself.