Comment 13 for bug 939577

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 939577] Re: Fourth level blocks indent incorrectly

Am 25.02.2012 10:22, schrieb Ryan Kaskel:
> Hi Andreas,
>
> I'm reopening this issue because I'm not sure if I communicated the
> original bug report correctly.
>

ahh, no, it's my bad. After re-reading I understand your recipe.
Sorry being that stupid :)

Also seeing the bug now - on it.

Cheers,

Andreas

> If I type in emacs with python-mode on:
>
> if True:
> x = 1
> if x:
> y = 2
> if y:
> z = 3
> ^
> |------------ python-mode indents 8 spaces instead of four.
>
> Each type I pressed RET after a colon (":"), the cursor indented four
> spaces.
>
> The third time I pressed RET after an if statement (although this
> happens after all blocks), the cursor moved 8 spaces.
>
> if True: # pressing RET here will move the cursor 4 spaces from column 0
> if True: # pressing RET here will move the cursor 8 spaces from column 0
> if True: # pressing RET here will move the cursor *16* spaces from column 0; this doesn't make sense
> if True: # pressing RET here will move the cursor 20 spaces from column 0
> pass
>
> Notice the indentation pattern is 4 - 8 - 16 - 20; it should be 4 - 8 -
> 12 -16.
>
> I completely agree that people should be able to code however they like,
> but there is a bug in the current behavior.
>