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

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

Re: Using face names as FACESPEC in font-lock-keywords does not work


From: Emanuel Berg
Subject: Re: Using face names as FACESPEC in font-lock-keywords does not work
Date: Wed, 22 Jun 2022 22:46:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I have the following piece of code that is supposed to add
> highlighting for CPP-like conditionals in my mode:
>
> (setq-local font-lock-defaults
>             (let* ((cpp-rx (rx line-start
>                                "#" (or "if" "ifdef" "else"
>                                "elif" "endif")
>                                word-boundary))

They are `font-lock-preprocessor-face' in `c++-mode'. No good?

Actually the need for a preprocessor is indicative of
a language that lacks in ... something?

> In any case, I think that the documentation deserves a bit
> of sharpening.

Do it yourself Jan :)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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