Avoid potential infloop
* lisp/progmodes/python.el (python-info-dedenter-opening-block-positions): Avoid potential infloop (bug#62031).
This commit is contained in:
parent
34c14430e9
commit
c2ca009da4
1 changed files with 3 additions and 3 deletions
|
@ -5792,9 +5792,9 @@ likely an invalid python file."
|
||||||
(catch 'exit
|
(catch 'exit
|
||||||
(while (python-nav--syntactically
|
(while (python-nav--syntactically
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(cl-loop for pt = (re-search-backward (python-rx block-start) nil t)
|
(cl-loop while (re-search-backward (python-rx block-start) nil t)
|
||||||
until (memq (char-before) '(nil ?\s ?\t ?\n))
|
if (memq (char-before) '(nil ?\s ?\t ?\n))
|
||||||
finally return pt))
|
return t))
|
||||||
#'<)
|
#'<)
|
||||||
(let ((indentation (current-indentation)))
|
(let ((indentation (current-indentation)))
|
||||||
(when (and (not (memq indentation collected-indentations))
|
(when (and (not (memq indentation collected-indentations))
|
||||||
|
|
Loading…
Add table
Reference in a new issue