bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61275: c-ts-mode: (eq treesit-font-lock-level 2) doesn't fontify par


From: Alan Mackenzie
Subject: bug#61275: c-ts-mode: (eq treesit-font-lock-level 2) doesn't fontify parameter names.
Date: Sat, 4 Feb 2023 16:27:13 +0000

Hello, Emacs.

In master (or probably the release branch), setting
treesit-font-lock-level to 2 for c-ts-mode fontifies variable
definitions, but not the parameter definitions of a C function.

For example, in

    int foo (int bar)
    {
        int baz;

        baz = bar;
        return baz;
    }

, the definition of bar is not fontified, but that of baz is.

There doesn't appear to be a (documented) way to get something similar to
C Mode's fontification, where the declarations of variables and
parameters were fontified, but not their use.

This is a fontification detail I would very much like to have.  In long
straggling C functions, variables are frequently declared in the middle
of the functions, and having the declarations stand out makes it easy to
search for them with the eye.  It is less easy if parameters aren't also
fontified.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]