]> git.eshelyaron.com Git - emacs.git/commit
Improve c-ts-mode font-lock for function names (bug#63390)
authorYuan Fu <casouri@gmail.com>
Fri, 19 May 2023 23:09:17 +0000 (16:09 -0700)
committerYuan Fu <casouri@gmail.com>
Fri, 19 May 2023 23:11:23 +0000 (16:11 -0700)
commitf571e8f1bb678c52839180e450c2415b31a70516
treed46835535dabd81c0c78415c7fcbbe7d876ce0df
parent42a28ffdc27498b66904c3d49e2f000a9b4690ca
Improve c-ts-mode font-lock for function names (bug#63390)

When a function definition has preproc directives in its body, it
can't correctly parse into a function_definition.  This fix tries to
recognize this case and highlight the function_declarator correctly.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--font-lock-settings): New rule.
(c-ts-mode--top-level-declarator): New function.
lisp/progmodes/c-ts-mode.el