Kaydet (Commit) 1a1c6bbf authored tarafından Barry Warsaw's avatar Barry Warsaw

(py-outdent-p): Short circuit infloop for illegal construct

(e.g. except: on first line of buffer).
üst 83c74d44
...@@ -968,6 +968,8 @@ py-beep-if-tab-change\t\tring the bell if `tab-width' is changed" ...@@ -968,6 +968,8 @@ py-beep-if-tab-change\t\tring the bell if `tab-width' is changed"
(save-excursion (save-excursion
(and (progn (back-to-indentation) (and (progn (back-to-indentation)
(looking-at py-outdent-re)) (looking-at py-outdent-re))
;; short circuit infloop on illegal construct
(not (bobp))
(progn (forward-line -1) (progn (forward-line -1)
(py-goto-initial-line) (py-goto-initial-line)
(back-to-indentation) (back-to-indentation)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment