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

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

bug#68827: Possible solution


From: Gabriele Nicolardi
Subject: bug#68827: Possible solution
Date: Wed, 31 Jan 2024 20:56:12 +0100
User-agent: Mozilla Thunderbird

Hi,

I checked the value of the font-lock-keywords variable and found: 

```lang-el

("\\\(ProvidesFile\|href\|nolinkurl\|path\|url\) \(\[[^]]\] \){\(\(?:[^{}\]\|\\.\|{[^}]}\)+\)" 3 'tex-verbatim t)

```

If I use this command to add fontification:

```lang-el

(font-lock-add-keywords nil '(("\\\(ProvidesFile\|href\|nolinkurl\|path\|url\) \(\[[^]]\] \){\(\(?:[^{}\]\|\\.\|{[^}]}\)+\)" 3 'tex-verbatim keep)))

```

the problem disappears.

From the manual, I read:

The last two values in subexp-highlighter, override and laxmatch, are optional flags. If override is t, this element can override existing fontification made by previous elements of font-lock-keywords. If it is keep, then each character is fontified if it has not been fontified already by some other element. If it is prepend, the face specified by facespec is added to the beginning of the font-lock-face property. If it is append, the face is added to the end of the font-lock-face property.

So I think that "keep" should be the right choice.



reply via email to

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