]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(py-statement-closes-block-p): Add a py-goto-initial-line which fixes
authorBarry Warsaw <barry@python.org>
Mon, 24 May 1999 18:37:57 +0000 (18:37 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 24 May 1999 18:37:57 +0000 (18:37 +0000)
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

Misc/python-mode.el

index e139b5148dbb168f5d9c1111fa343e9d62ca9b3d..3e24ba371ceb8c09b6c892a4bcd4da7673328245 100644 (file)
@@ -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))))