diff options
author | Barry Warsaw <barry@python.org> | 1999-05-24 18:37:57 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1999-05-24 18:37:57 (GMT) |
commit | a8f99ba2d217f94d8129bede137296b08c16c750 (patch) | |
tree | a47dbb05f0043046c3d26ea5326599c0c8c58afd /Misc | |
parent | c7ba0800dd8493d0f44264eb50dcddaf02eeb40b (diff) | |
download | cpython-a8f99ba2d217f94d8129bede137296b08c16c750.zip cpython-a8f99ba2d217f94d8129bede137296b08c16c750.tar.gz cpython-a8f99ba2d217f94d8129bede137296b08c16c750.tar.bz2 |
(py-statement-closes-block-p): Add a py-goto-initial-line which fixes
indentation when the return value is a multiline sexp:
def bug():
try:
if 2>1:
return (11+
12)
else: #XXX
return 12
except:
return 13
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/python-mode.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el index e139b51..3e24ba3 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -2923,6 +2923,7 @@ I.e., if the line starts with `return', `raise', `break', `continue', and `pass'. This doesn't catch embedded statements." (let ((here (point))) (back-to-indentation) + (py-goto-initial-line) (prog1 (looking-at (concat py-block-closing-keywords-re "\\>")) (goto-char here)))) |