Emacs's Python mode has an annoying "feature" that automatically indents line continuations from parentheses and brackets against the opening bracket in the previous line. So we get stuff like
myfunc(a, b, c,
d, e, f)
This is annoying because it makes the indentation throughout the file look inconsistent, but also because you get stuff like
myfunc(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, (x,
y, z))
(I've made it so long to illustrate that this usually happens automatically based on the column size)
If I were to add more arguments to myfunc, everything would be stuck over there with the x
.
I want it to always indent additional lines four spaces more than the first line. Continuations against \
seem to do the right thing (I'm not positive that it's right 100% of the time, though, as I rarely use \
). For example, what I want for the above would be
myfunc(a, b, c,
d, e, f)
and
myfunc(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, (x,
y, z))
So I guess I want the reverse of Proper indendation with backslash line continuations in python-mode.el.