From e0760599b045a7ef3828ae4b624246b6beec2e75 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 15 Nov 2022 02:22:41 -0800 Subject: Remove the contextual hack in tree-sitter fontification We now have a better facility that can replace the contextual hack. The C part is in the previous commit, and the Lisp part work will be in the next commit. * doc/lispref/modes.texi (Parser-based Font Lock): Update manual. * lisp/progmodes/js.el (js--treesit-font-lock-settings) * lisp/progmodes/python.el (python--treesit-settings) * lisp/progmodes/ts-mode.el (ts-mode--font-lock-settings): Stop marking contextual nodes. * lisp/treesit.el (treesit-font-lock-contextual-post-process): Remove function. (treesit-font-lock-fontify-region): Remove code processing contextual nodes. --- lisp/progmodes/python.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp/progmodes/python.el') diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a5d02d0fcba..7919484e096 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1047,8 +1047,7 @@ be fontified." :language 'python :override t ;; TODO Document on why we do this. - '((string :anchor "\"" @python--treesit-fontify-string) - (string) @contextual) + '((string :anchor "\"" @python--treesit-fontify-string)) :feature 'string-interpolation :language 'python -- cgit v1.2.3