Merge "Improve dumb terminal support (emacs is dumb)."