]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(py-outdent-p): Short circuit infloop for illegal construct
authorBarry Warsaw <barry@python.org>
Sat, 9 Jan 1999 17:22:38 +0000 (17:22 +0000)
committerBarry Warsaw <barry@python.org>
Sat, 9 Jan 1999 17:22:38 +0000 (17:22 +0000)
(e.g. except: on first line of buffer).

Misc/python-mode.el

index ae570e5e2148de14b0d449a24dc8519010944112..48d1b612fa010f6d2d31a3a6f8dc3cf886b79240 100644 (file)
@@ -968,6 +968,8 @@ 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))
+        ;; short circuit infloop on illegal construct
+        (not (bobp))
         (progn (forward-line -1)
                (py-goto-initial-line)
                (back-to-indentation)