unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gabriele Nicolardi <gabriele@medialab.sissa.it>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 68827@debbugs.gnu.org
Subject: bug#68827: Possible solution
Date: Sat, 10 Feb 2024 10:25:38 +0200	[thread overview]
Message-ID: <86bk8ovi7x.fsf@gnu.org> (raw)
In-Reply-To: <457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it> (message from Gabriele Nicolardi on Wed, 31 Jan 2024 20:56:12 +0100)

> Date: Wed, 31 Jan 2024 20:56:12 +0100
> From: Gabriele Nicolardi <gabriele@medialab.sissa.it>
> 
> 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.

Stefan, any comments to this proposed solution?





  reply	other threads:[~2024-02-10  8:25 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 ` bug#68827: Possible solution Gabriele Nicolardi
2024-02-10  8:25   ` Eli Zaretskii [this message]
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=86bk8ovi7x.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68827@debbugs.gnu.org \
    --cc=gabriele@medialab.sissa.it \
    --cc=monnier@iro.umontreal.ca \
    /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).