automatic nesting and indentation in emacs

porterboy porterboy76 at yahoo.com
Fri Feb 25 05:30:52 EST 2005


CONTEXT:
I am using Emacs to edit Python code and sometimes also Matlab code.
When I hit <return> in a loop of some sort, Emacs usually gets the
nesting indentation right, which is particularly important in Python.
To ensure this I have used python-mode.el and matlab.el modes in
emacs.

QUESTION:
If I suddenly decide I want an outer loop, do I have to manually
readjust the indentation of all the inner loops? Or can emacs do it
automatically? I know the Matlab in-built editor has a tool called
"smart-indent" which will automatically align highlighted text to have
the correct indentation. Does Emacs have something similar?

Thanks
The Porterboy - "Lovely day for a Guinness"



More information about the Python-list mailing list