From eeeae5e9ee34da5539046ff8dac4f4fffa19a5b9 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Mon, 31 Oct 2022 15:03:49 -0700 Subject: Add an argument OVERRIDE to tree-sitter font-lock functions * doc/lispref/modes.texi (Parser-based Font Lock): Reflect this change in manual. * lisp/progmodes/js.el (js--fontify-template-string): Add _OVERRIDE argument. * lisp/progmodes/python.el (python--treesit-fontify-string): Add _OVERRIDE argument. * lisp/treesit.el (treesit-font-lock-rules): Update docstring. (treesit-fontify-with-override): New function. (treesit-font-lock-fontify-region): Extract out into treesit-fontify-with-override. --- lisp/progmodes/python.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes/python.el') diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a9aff167767..0b10058eebe 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1015,7 +1015,7 @@ It makes underscores and dots word constituent chars.") "VMSError" "WindowsError" )) -(defun python--treesit-fontify-string (_beg _end node) +(defun python--treesit-fontify-string (_beg _end node _override &rest _) "Fontify string. NODE is the last quote in the string. Do not fontify the initial f for f-strings." -- cgit v1.2.1