long-winded () termination indentation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Andreas Roehler |
Bug Description
# test code:
if titles:
Placing the cursor on either of the last two lines, and hitting TAB causes it to outdent.
The style shown has been produced historically both in the GNU emacs 22.1.1 python-mode and versions of launchpad python-mode prior to 6.0 (IIRC).
When I first discovered how those python-modes worked, I was a bit surprised, because in other languages such as C and Perl, the style was to align the closing ) at the same indentation as the first line of the statement, rather than one indent level in, as shown above. But because of Python's implicit block endings (no endif), I came to agree with those python-modes, and now think that Python code looks cleaner if the closing ) is one indent in from the first character of the beginning line of the statement.
And then along comes python-mode 6.0, which changes it? Seems like a bug to me.
Changed in python-mode: | |
assignee: | nobody → Andreas Roehler (a-roehler) |
Changed in python-mode: | |
milestone: | none → 6.1 |
Changed in python-mode: | |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in python-mode: | |
status: | In Progress → Fix Committed |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
Hi Barry,
get the results below, which seems the desired indent IIRC.
If it's wrong, please tell,
cheers,
Andreas
# test code:
items. append(
ht(
T.a( 'Sorted by title', href='#TOCtitle', ),
' -- Numbers and titles sorted by title',
self. Tbr( epub ),
self. Tbr( epub ),
)
if titles:
)