unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Gabriele Nicolardi <gabriele@medialab.sissa.it>
Cc: 68827-done@debbugs.gnu.org
Subject: bug#68827: Possible solution
Date: Thu, 15 Feb 2024 15:11:43 -0500	[thread overview]
Message-ID: <jwvle7l7b12.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it> (Gabriele Nicolardi's message of "Wed, 31 Jan 2024 20:56:12 +0100")

> I noticed that the tex-verbatim face used in latex-mode to highlight the
> \href argument has priority on font-lock-comment-face.

I'm not sure if it should qualify as a bug or as a feature, to be honest.

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

Thanks.  `keep` seems right for the case where the match is inside
a comment, as in your case, but there are other cases where we want
to override the previously applied face (e.g. $math$).

I pushed a patch which re-arranges the rules to avoid that
other problem.


        Stefan






  parent reply	other threads:[~2024-02-15 20:11 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
2024-02-15 20:11   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
     [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=jwvle7l7b12.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=68827-done@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).