Sorry to say that I use emacs, so I can't help you too much. It occasionally screws up indentation but otherwise stays out of my way.
(I'm far from an emacs power user -- also I don't use the interactive toplevel much, and never from inside emacs; instead I throw that sort of thing in run-once junit code in case it becomes a test suite.)