From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
To: 68827@debbugs.gnu.org
Subject: bug#68827: Possible solution
Date: Wed, 31 Jan 2024 20:56:12 +0100 [thread overview]
Message-ID: <457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it> (raw)
In-Reply-To: <8204e83e-f660-4c7e-a966-2b0b111fa5e9@medialab.sissa.it>
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1774 bytes --]
next prev parent reply other threads:[~2024-01-31 19:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 18:16 bug#68827: 29.1; Latex mode: tex-verbatim face has priority on font-lock-comment-face Gabriele Nicolardi
2024-01-31 19:56 ` Gabriele Nicolardi [this message]
2024-02-10 8:25 ` bug#68827: Possible solution Eli Zaretskii
2024-02-15 20:11 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.68827.D68827.170802793225463.notifdone@debbugs.gnu.org>
2024-02-20 13:45 ` bug#68827: closed (Re: bug#68827: Possible solution) Gabriele Nicolardi
2024-02-20 14:42 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it \
--to=gabriele@medialab.sissa.it \
--cc=68827@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).