From: Vincenzo Pupillo Date: Tue, 17 Dec 2024 11:14:29 +0000 (+0100) Subject: Fix treesit-font-lock-level in python-ts-mode X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ff339e1afa8076251af199e31a4bfd7b0f357800;p=emacs.git 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'. (cherry picked from commit 78736420746e78445d4ff1889b56c85b66ca794e) --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index b59f493b75d..71591af2118 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1102,7 +1102,8 @@ fontified." (ignore-interpolation (not (seq-some (lambda (feats) (memq 'string-interpolation feats)) - (seq-take treesit-font-lock-feature-list treesit-font-lock-level)))) + (seq-take treesit-font-lock-feature-list + (treesit--compute-font-lock-level treesit-font-lock-level))))) ;; If interpolation is enabled, highlight only ;; string_start/string_content/string_end children. Do not ;; touch interpolation node that can occur inside of the