aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorYuan Fu2022-10-31 15:03:49 -0700
committerYuan Fu2022-10-31 15:03:49 -0700
commiteeeae5e9ee34da5539046ff8dac4f4fffa19a5b9 (patch)
treeb815a383714dc3ee9d33c61fc39e91429709f344 /lisp/progmodes/python.el
parent9fab83ed7a90209e3873039e7ae4993c667e2759 (diff)
downloademacs-eeeae5e9ee34da5539046ff8dac4f4fffa19a5b9.tar.gz
emacs-eeeae5e9ee34da5539046ff8dac4f4fffa19a5b9.zip
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.")
1015 "VMSError" "WindowsError" 1015 "VMSError" "WindowsError"
1016 )) 1016 ))
1017 1017
1018(defun python--treesit-fontify-string (_beg _end node) 1018(defun python--treesit-fontify-string (_beg _end node _override &rest _)
1019 "Fontify string. 1019 "Fontify string.
1020NODE is the last quote in the string. Do not fontify the initial 1020NODE is the last quote in the string. Do not fontify the initial
1021f for f-strings." 1021f for f-strings."