emacs-devel
[Top][All Lists]
Advanced

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

Re: Could the current font-lock mechanism support font locking code in c


From: Stefan Monnier
Subject: Re: Could the current font-lock mechanism support font locking code in comments?
Date: Tue, 30 Mar 2021 12:18:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> the comment starter // should have regular comment color and the code
> inside should be syntax highlighted with dimmed colors of the regular
> faces.
> Does this complicate things?

Yes and no: AFAIK Emacs's faces don't support "dimming", so you either
do it the hard way and get what you describe (which requires creating new
faces and hence knowing which faces are used by the current
font-lock-rules, etc...), or you take the easy way out and just apply an
additional face that marks the commented out code in some other way
(e.g. by adding a background color).


        Stefan




reply via email to

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