From: Barry Warsaw Date: Sat, 9 Jan 1999 17:22:38 +0000 (+0000) Subject: (py-outdent-p): Short circuit infloop for illegal construct X-Git-Tag: v1.5.2b2~401 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a1c6bbf8c1bb81dfc6310523a1fc6d6f4847b01;p=thirdparty%2FPython%2Fcpython.git (py-outdent-p): Short circuit infloop for illegal construct (e.g. except: on first line of buffer). --- diff --git a/Misc/python-mode.el b/Misc/python-mode.el index ae570e5e2148..48d1b612fa01 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -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)