Emacs and Indentation
Bernhard Herzog
bh at intevation.de
Wed Nov 6 11:54:48 EST 2002
"Michael Tiller" <mtiller at ford.com> writes:
> Sure, I can type stuff like this:
>
> if not x in filled:
> foo[x] = x[1]
> bar[x] = x[2]
> y = x
>
> ...and Emacs handles this just as I would expect. BUT, what happens when I
> try to put this code into a for loop? After I add my for loop, I have:
>
> for x in mylist:
> if not x in filled:
> foo[x] = x[1]
> bar[x] = x[2]
> y = x
>
> In other languages (Tcl, Java, C++) where the block delimiters are explicit,
> I can just highlight the region and issue an "indent-region" and it would
> automatically indent everything appropriately. As far as I can tell, this
> does nothing in Emacs (v21.4, windows). So, I have to go and indent using
> the TAB key.
Select the region you want indented and use C-c >
Use C-c < to outdent
Bernhard
--
Intevation GmbH http://intevation.de/
Sketch http://sketch.sourceforge.net/
MapIt! http://www.mapit.de/
More information about the Python-list
mailing list