summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-01-21 05:36:18 (GMT)
committerBarry Warsaw <barry@python.org>1998-01-21 05:36:18 (GMT)
commitf06777dd7cbaf5a0940a0c72d811ecbb7537d8ce (patch)
tree208b69db496893d5f401c2ad670364dbc39564d7 /Misc
parent9ec9fbc35540f29f1c1dd3874962fc9f98cd7b7a (diff)
downloadcpython-f06777dd7cbaf5a0940a0c72d811ecbb7537d8ce.zip
cpython-f06777dd7cbaf5a0940a0c72d811ecbb7537d8ce.tar.gz
cpython-f06777dd7cbaf5a0940a0c72d811ecbb7537d8ce.tar.bz2
(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()
Diffstat (limited to 'Misc')
-rw-r--r--Misc/python-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index bd69739..1cff2d9 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -960,7 +960,9 @@ py-beep-if-tab-change\t\tring the bell if tab-width is changed"
(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))