[RFC] whitespace.el

skip at pobox.com skip at pobox.com
Fri Apr 27 10:52:52 EDT 2007


    Stephen> ... whitespace cleanup has been an issue on Python lists the
    Stephen> last couple of days, and they might be interested.

Just an FYI (haven't posted this to python-dev yet), my problems with
dangling whitespace are caused by hitting RET or LF (py-newline-and-indent)
which indents according to the current environment, then moving away from
that indentation using a command python-mode doesn't know about
(e.g. previous-line), so it doesn't have the opportunity to delete the
whitespace.  The whitespace module might help here, though I've never used
it.  I think the best place for it would be as a write-file-hook though I
worry about it not being aware of Python's triple-quoted strings which can
extend over multiple lines and which might presumably contain legitimate
trailing whitespace.  (It might be interesting to have a list of
cursor-motion-hooks which would get called just before point moves, but
that's another story altogether.)

Skip



More information about the XEmacs-Beta mailing list