[Python-Dev] whitespace normalization

skip at pobox.com skip at pobox.com
Fri Apr 27 17:29:14 CEST 2007


    > Just a little FYI, python-mode (the one Barry and I manage - dunno
    > about the one distributed w/ GNU Emacs these days) is one of those
    > tools that leaves trailing whitespace behind when advancing to the
    > next line..

Okay, I figured this out.  The dangling whitespace turds are caused by LF or
RET followed by a regular cursor motion keypress (e.g. C-n or the arrow
keys) which move the cursor away from that line.  Those commands operate
outside python-mode's control there so it doesn't get the opportunity to
remove the whitespace before moving the cursor.  XEmacs (at least) doesn't
have a cursor-motion-hook so there's no clean way to do this.

I've been using Emacs for so many years that my central control program long
ago pushed out most of the basic cursor motion control code to ganglia which
reside in my wrists.  The channel is full duplex but highly assymetric.  The
upload speed is very slow.  It thus takes a couple days to realize in my
frontal cortex how this low level stuff works...

Skip



More information about the Python-Dev mailing list