[Python-mode] one more myrkwid bug
Andreas Röhler
andreas.roehler at online.de
Fri Apr 15 08:59:48 CEST 2011
Am 14.04.2011 23:09, schrieb Barry Warsaw:
> On Apr 14, 2011, at 11:18 PM, Andreas Röhler wrote:
>
>> think we have discussed that with bug #748198:
>>
>> col 8 will be reached _after_ the closing paren, not before.
>>
>> When inside a dict, its pairs get piled up.
>>
>> Unless you want to have that otherwise....
>
> Hi Andreas, yes this is slightly different. Let's look at two examples.
>
> -----snip snip-----
> def foo():
> x = dict(a=1,
> -----snip snip-----
>
> When point is after the comma and you hit return, the next line should line up
> under the 'a'. Which it does, so there's no problem here.
>
> -----snip snip-----
> def foo():
> x = dict(
> -----snip snip-----
>
> Here, the open paren is the last thing on the line. When point is after the
> open paren and you hit return, you should land 4 spaces indented from under
> the 'x', not (as is currently the case) to the space right of the open paren.
>
> This is because you'll end up writing this:
>
> -----snip snip-----
> def foo():
> x = dict(
> a=1,
> b=2,
> c=3,
> )
> -----snip snip-----
>
Hi Barry,
get
def foo():
x = dict(
a=1,
b=2,
c=3,
)
which looks okay for me.
If "4 spaces after assignement start" shall be the rule, we get next bug
report, should someone leave out the spaces, which would produce a nasty
def foo():
x=dict(
a=1,
b=2,
c=3,
)
Anyway, should you being sure to want that, it's to implement.
Would make that customizable with a var
align-to-dict
or so, which would be true here, nil the default. (?)
BTW: indent should go along with meaning, if possible.
Well, you being the authority :)
Cheers
Andreas
PS Applied patch from 691542 this morning. Will push it into myrkwid also.
More information about the Python-mode
mailing list