Fixed long-standing issue with Emacs Comint modes.