From: Yuan Fu Date: Mon, 21 Nov 2022 20:07:20 +0000 (-0800) Subject: ; Minor fix in c-ts-mode fontification X-Git-Tag: emacs-29.0.90~1617 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b2ea38ab03e801859163b74a292aa75008e36541;p=emacs.git ; Minor fix in c-ts-mode fontification * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): use override. Include the outer call_expression. (c-ts-mode--fontify-defun): Use the override given to it rather than hard-code. Add missing space. --- diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 371c6180de9..65419cca7d4 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -337,8 +337,10 @@ MODE is either `c' or `cpp'." :language mode :feature 'emacs-devel - '(((call_expression function: (identifier) @fn) - @c-ts-mode--fontify-defun + :override t + '(((call_expression + (call_expression function: (identifier) @fn) + @c-ts-mode--fontify-defun) (:match "^DEFUN$" @fn))))) (defun c-ts-mode--fontify-declarator (node override start end &rest args) @@ -399,12 +401,12 @@ This function corrects the fontification on the colon in (treesit-fontify-with-override (max start (treesit-node-start type)) (min end (treesit-node-end type)) - 'font-lock-type-face t)) + 'font-lock-type-face override)) (when arg (treesit-fontify-with-override - (max start(treesit-node-start arg)) + (max start (treesit-node-start arg)) (min end (treesit-node-end arg)) - 'default t)))))) + 'default override)))))) (defun c-ts-mode--imenu-1 (node) "Helper for `c-ts-mode--imenu'.