diff Misc/python-mode.el @ 10875:1821e64e08fc legacy-trunk

(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
author Barry Warsaw <barry@python.org>
date Mon, 24 May 1999 18:37:57 +0000
parents a86fe1f3cf4e
children 17ae178a3038
line wrap: on
line diff
--- a/Misc/python-mode.el	Fri May 21 21:42:27 1999 +0000
+++ b/Misc/python-mode.el	Mon May 24 18:37:57 1999 +0000
@@ -2923,6 +2923,7 @@
 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))))