Emacs: displaying list of subroutines/functions/classes in a source file
Solution 1:
Try M-x occur RET exp RET
- this lists in a new buffer all the occurrences of the exp
in the current buffer.
Solution 2:
Most people of course will tell you to just use a modern IDE but they don't understand the power of emacs
. Personally, I use ECB which makes my emacs
look like this:
The middle window on the left hand side is the list of functions of the current source file. Middle clicking the name moves the cursor to that function's definition.
To install, follow the instructions on the ECB website to install ECB and then add this line to your ~/.emacs
(changing the location accordingly):
(add-to-list 'load-path
"~/.emacs-lisp/ecb/")
Another option is CEDET but I have not used it.