Fix hangs caused by unbalanced braces in Python f-strings
* lisp/progmodes/python.el (python--font-lock-f-strings): Temporarily bind forward-sexp-function to nil when calling 'up-list'. (Bug#74738)
This commit is contained in:
parent
75e3ea0423
commit
3c247f86b7
1 changed files with 2 additions and 1 deletions
|
@ -623,7 +623,8 @@ the {...} holes that appear within f-strings."
|
|||
(forward-char 1) ;Just skip over {{
|
||||
(let ((beg (match-beginning 0))
|
||||
(end (condition-case nil
|
||||
(let ((parse-sexp-ignore-comments))
|
||||
(let ((forward-sexp-function)
|
||||
(parse-sexp-ignore-comments))
|
||||
(up-list 1)
|
||||
(min send (point)))
|
||||
(scan-error send))))
|
||||
|
|
Loading…
Add table
Reference in a new issue