> For instance, when I was doing a lot of Java programming, I used > hideshow.el all the time to hide block and function bodies. Works very > well (although the default key bindings are annoying to me). Have a > look! It's a standard package in emacs, at least in Emacs 24 but much > earlier than that I believe. > > There's a small add-on called hideshow-org.el which may be useful as > well:
Having read the OP, I'll second Eric's vote for hideshow-org. It's a better solution for folding functions. However, the combination of org/outline-minor-mode/Tassilo's code works well for splitting a file into foldable sections. Incidentally, you can use both of these methods at the same time; they don't conflict too much. --l