Thanks to a tip from Tal Einat, I imported the python reindent code
from IDLE -- tab anywhere on the line in python mode now indents the
line to the correct indentation.  It works really well, as good as
XEmacs for all the tests I've thrown at it.  That's the benefit from
borrowing someone else's already-debugged code!  Took me a little
while to adapt it, but much much less that me trying to figure out the
indentation algorithm by reading elisp code. :)

It seems fast; I know that was one of Josiah's concerns about scanning
arbitrarily far backwards in the file in order to find the correct
indentation.  Admittedly I don't exactly have low end hardware, but
still; if it's good enough for IDLE which is targeted at a mainstream
(i.e. not bleeding edge gamer hardware) computers, it should be OK for
me.

So, kudos to the IDLE developers for making PyParse.py a standalone
module without any interdependencies with the rest of IDLE's code.
The interface was pretty straightforward, so it wasn't too hard to
adapt.

www.flipturn.org/peppy/Status.html

Rob

Reply via email to