summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2022-10-31 15:03:49 -0700
committerYuan Fu <casouri@gmail.com>2022-10-31 15:03:49 -0700
commiteeeae5e9ee34da5539046ff8dac4f4fffa19a5b9 (patch)
treeb815a383714dc3ee9d33c61fc39e91429709f344 /lisp/progmodes/python.el
parent9fab83ed7a90209e3873039e7ae4993c667e2759 (diff)
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.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el2
1 files changed, 1 insertions, 1 deletions
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."