Comment 3 for bug 1006643

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 1006643] [NEW] Incorrect re-indentation

Am 31.05.2012 17:14, schrieb Barry Warsaw:
> On May 31, 2012, at 05:51 AM, Andreas Roehler wrote:
>
>> Am 31.05.2012 00:48, schrieb Barry Warsaw:
>>> Public bug reported:
>>>
>>> Start with this code:
>>>
>>> def foo():
>>> if a == 1:
>>> x = 7
>>> if b == 2
>>>
>>> with point right after the '2'. Now hit : and watch the line get re-
>>> indented to line up under the 'x'. This should not happen since I just
>>> explicitly dedented it when I started the line.
>>
>> Hi Barry,
>>
>> the rationale of smart-indentation is: "go to the outmost reasonable
>> indent"
>>
>> C-u :
>>
>> should DTRT
>
> It does, but I still don't think that's correct, since it's much more
> difficult to type. I'm not sure exactly what the rule should be, but this is
> the one current thing that drives me crazy. :)
>

so M-x py-smart-indentation-off

or M-x customize-variable RET py-smart-indentation

might save you :)

BTW maybe should set `py-smart-indentation' default to nil?

The curious thing around: AFAIS beginners expect this feature.

Cheers