]> git.eshelyaron.com Git - emacs.git/commit
Fix font-lock of Python f-strings
authorkobarity <kobarity@gmail.com>
Wed, 11 Dec 2024 14:21:04 +0000 (23:21 +0900)
committerEshel Yaron <me@eshelyaron.com>
Sun, 15 Dec 2024 16:39:14 +0000 (17:39 +0100)
commit3de275c49361ce757de4e4b1635fb5fab9268512
tree44ba1395f7e18593e1f7c45e9e4337035e3a4bb2
parent3bb3d78dad22f502117a2f7c6897bbf0b3ee63f6
Fix font-lock of Python f-strings

* lisp/progmodes/python.el (python--font-lock-f-strings): Bind
'parse-sexp-ignore-comments' to nil so that we can look for
closing braces even if a hash is used in the format specifier.
* test/lisp/progmodes/python-tests.el
(python-font-lock-f-string-1): New test.  (Bug#74738)

(cherry picked from commit 71cd290c20dbbd8b14f09818b3c1b58623aea350)
lisp/progmodes/python.el
test/lisp/progmodes/python-tests.el