mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
(py-outdent-p): Short circuit infloop for illegal construct
(e.g. except: on first line of buffer).
This commit is contained in:
parent
83c74d44ce
commit
1a1c6bbf8c
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue