diff options
| author | Dmitry Gutov | 2023-03-09 00:43:31 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2023-03-09 00:43:31 +0200 |
| commit | c2ca009da4cc2c81be364a1ddac15e8c7585ddf6 (patch) | |
| tree | 311b5fd5accc4ce7486eb64709c78526ec23342d | |
| parent | 34c14430e9d070ffc98527fc95677dd5c5758536 (diff) | |
| download | emacs-c2ca009da4cc2c81be364a1ddac15e8c7585ddf6.tar.gz emacs-c2ca009da4cc2c81be364a1ddac15e8c7585ddf6.zip | |
Avoid potential infloop
* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions):
Avoid potential infloop (bug#62031).
| -rw-r--r-- | lisp/progmodes/python.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 81475f31f60..630250c15c3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -5792,9 +5792,9 @@ likely an invalid python file." | |||
| 5792 | (catch 'exit | 5792 | (catch 'exit |
| 5793 | (while (python-nav--syntactically | 5793 | (while (python-nav--syntactically |
| 5794 | (lambda () | 5794 | (lambda () |
| 5795 | (cl-loop for pt = (re-search-backward (python-rx block-start) nil t) | 5795 | (cl-loop while (re-search-backward (python-rx block-start) nil t) |
| 5796 | until (memq (char-before) '(nil ?\s ?\t ?\n)) | 5796 | if (memq (char-before) '(nil ?\s ?\t ?\n)) |
| 5797 | finally return pt)) | 5797 | return t)) |
| 5798 | #'<) | 5798 | #'<) |
| 5799 | (let ((indentation (current-indentation))) | 5799 | (let ((indentation (current-indentation))) |
| 5800 | (when (and (not (memq indentation collected-indentations)) | 5800 | (when (and (not (memq indentation collected-indentations)) |