diff --git a/Misc/python-mode.el b/Misc/python-mode.el index bd69739ae0b..1cff2d9d0f3 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))