aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorVincenzo Pupillo2024-12-17 12:14:29 +0100
committerYuan Fu2024-12-17 13:37:32 -0800
commit78736420746e78445d4ff1889b56c85b66ca794e (patch)
tree666750c6e172f5c262dc8a6d84697474f7250688 /lisp/progmodes/python.el
parent69facd33a80bee3f49b0518e75e8ec570978334c (diff)
downloademacs-78736420746e78445d4ff1889b56c85b66ca794e.tar.gz
emacs-78736420746e78445d4ff1889b56c85b66ca794e.zip
Fix treesit-font-lock-level in python-ts-mode
Now that 'treesit-font-lock-level' can be a number or a list, it should be handled using 'treesit--compute-font-lock-level'. * lisp/progmodes/python.el (python--treesit-fontify-string): Apply 'treesit--compute-font-lock-level' to 'treesit-font-lock-level'.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index dca0936c826..de1c6f551c4 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1108,7 +1108,8 @@ fontified."
1108 (ignore-interpolation (not 1108 (ignore-interpolation (not
1109 (seq-some 1109 (seq-some
1110 (lambda (feats) (memq 'string-interpolation feats)) 1110 (lambda (feats) (memq 'string-interpolation feats))
1111 (seq-take treesit-font-lock-feature-list treesit-font-lock-level)))) 1111 (seq-take treesit-font-lock-feature-list
1112 (treesit--compute-font-lock-level treesit-font-lock-level)))))
1112 ;; If interpolation is enabled, highlight only 1113 ;; If interpolation is enabled, highlight only
1113 ;; string_start/string_content/string_end children. Do not 1114 ;; string_start/string_content/string_end children. Do not
1114 ;; touch interpolation node that can occur inside of the 1115 ;; touch interpolation node that can occur inside of the