mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
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.
This commit is contained in:
parent
9fab83ed7a
commit
eeeae5e9ee
4 changed files with 49 additions and 31 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue