C-x h C-c r
"C-x h" is ordinary Emacs that sets the region to the whole buffer, then
"C-c r" runs the new function py-reindent-top-level-region. Here's the
"Reindent region with current value of py-indent-offset.
This is useful when you inherit Python code from someone who used
a silly (i.e., not yours) value for py-indent-offset, or just to see
what your code would look like if you changed your setting of py-
The region is assumed to be correctly indented and to start with top-
level Python code (i.e., code that starts in the first column). The
region is then reindented with the current value of py-indent-offset.
If you specify a numeric prefix argument, that will be used for the
indentation offset instead.
Special cases: whitespace is deleted from entirely blank lines; and
continuation lines are shifted by the same amount their base line was
shifted, in order to preserve their relative indentation with respect to
their base line."
shiftily y'rs - tim
Tim Peters Kendall Square Research Corp