Object oriented framework for multiple emacs modes based on indirect buffers