Karl Fogel at
Simple solution for saving window configurations on the fly in Emacs (I know there were existing solutions, but they were big and complex when I needed small and simple):
Later I made a small optimization, so if you're looking at this it's probably best to use the latest code:
http://viewvc.red-bean.com/kfogel/trunk/.emacs?revision=HEAD&view=markup#l3620
http://viewvc.red-bean.com/kfogel/trunk/.emacs?revision=HEAD&view=markup#l3620