From: Stefan Kangas Date: Thu, 18 Jul 2024 07:43:55 +0000 (+0200) Subject: Checkdoc fixes in treesit.el X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d8adfbee8c533ea9cba1c8b1afbce6e70feb073e;p=emacs.git Checkdoc fixes in treesit.el * lisp/treesit.el (treesit-add-font-lock-rules) (treesit--font-lock-mark-ranges-to-fontify): Checkdoc fixes. (cherry picked from commit 9889774c62e7430bce7f9a241ebe529ea00f2362) --- diff --git a/lisp/treesit.el b/lisp/treesit.el index b9661f53601..42215333699 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1122,7 +1122,7 @@ and leave settings for other languages unchanged." (t current-value)))))) (defun treesit-add-font-lock-rules (rules &optional how feature) - "Add font-lock RULES to the current buffer + "Add font-lock RULES to the current buffer. RULES should be the return value of `treesit-font-lock-rules'. RULES will be enabled and added to `treesit-font-lock-settings'. @@ -1413,7 +1413,8 @@ For RANGES and PARSER see `treesit-parser-add-notifier'. After the parser reparses, we get the changed ranges, and 1) update non-primary parsers' ranges in the changed ranges 2) mark these ranges as to-be-fontified, -3) tell syntax-ppss to start reparsing from the min point of the ranges. +3) tell `syntax-ppss' to start reparsing from the min point of the + ranges. We need to mark to-be-fontified ranges before redisplay starts working, because sometimes the range edited by the user is not the only range