Subject: Re: bug#7426: 23.2; term.el: After running stty -opost, printing \n\r inserts trailing spaces

From: Chong Yidong <[email-masked]>
Date: Fri, 19 Nov 2010 11:28:56 -0500

Thomas Fitzsimmons <[email-masked]> writes:

> term-vertical-motion expands to vertical-motion and it's that call that
> results in the spaces being inserted in the buffer.
>
> I worked around the issue by removing, after-the-fact, spaces inserted
> by the (vertical-motion 0) call.  A more efficient solution would be to
> prevent vertical-motion from inserting the spaces in the first place,
> but that happens deep within Emacs somewhere.  I'm hoping a terminal
> expert can suggest where to look.

That's strange.  vertical-motion should not affect the buffer contents;
it only moves point.