diff Misc/python-mode.el @ 7152:d39a805852c2 legacy-trunk

(py-outdent-p): When looking at the previous line, watch out for continuation lines. This fixes this bug report, reported by Frank Stajano. # But if I split the "raise" line and reindent, the else WRONGLY goes up a # level (?!?) while condition1: if condition2: raise error3, \ moreInfo4 else: # meant to close "if condition2" action5()
author Barry Warsaw <barry@python.org>
date Wed, 21 Jan 1998 05:36:18 +0000
parents d339954ea57d
children 26d07735ba4a
line wrap: on
line diff
--- a/Misc/python-mode.el	Wed Jan 21 05:15:57 1998 +0000
+++ b/Misc/python-mode.el	Wed Jan 21 05:36:18 1998 +0000
@@ -960,7 +960,9 @@
   (save-excursion
     (and (progn (back-to-indentation)
 		(looking-at py-outdent-re))
-	 (progn (backward-to-indentation 1)
+	 (progn (forward-line -1)
+		(py-goto-initial-line)
+		(back-to-indentation)
 		(while (or (looking-at py-blank-or-comment-re)
 			   (bobp))
 		  (backward-to-indentation 1))