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

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

bug#58940: [PATCH] feature/tree-sitter: Add more font lock faces


From: Stefan Monnier
Subject: bug#58940: [PATCH] feature/tree-sitter: Add more font lock faces
Date: Sun, 06 Nov 2022 09:05:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> BTW I see that font-lock-regexp-grouping-{backslash,construct}
>> do not have related variables like the rest of the faces. Why is that?
>
> No idea.  I didn't even know we had those faces until I've read your
> patch.
>
> Stefan, any idea why those faces don't have variables?

Not really, no.  But AFAIK the "variable associated with a face" is an
old idiosyncrasy of `font-lock.el` that's never been explained
nor justified.  It was used at some point for customization purposes (to
tweak the face buffer-locally) but we introduced the face-remapping
facility as a better replacement for that hack, so faces should not need
accompanying vars since Emacs-23.

I suspect that's part of the reason.  Ideally, we'd phase out those old
`font-lock-*-face` variables rather than introduce new ones.
I think the only thing they bring nowadays is confusion.


        Stefan






reply via email to

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