From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68827: Possible solution Date: Thu, 15 Feb 2024 15:11:43 -0500 Message-ID: References: <8204e83e-f660-4c7e-a966-2b0b111fa5e9@medialab.sissa.it> <457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25092"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68827-done@debbugs.gnu.org To: Gabriele Nicolardi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 15 21:13:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rai6h-0006Lk-C9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Feb 2024 21:13:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rai6N-0003AS-1e; Thu, 15 Feb 2024 15:12:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rai68-0002yf-7C for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 15:12:46 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rai67-0004rz-FS for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 15:12:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rai6P-0006eG-V7 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 15:13:01 -0500 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Feb 2024 20:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 68827 X-GNU-PR-Package: emacs Mail-Followup-To: 68827@debbugs.gnu.org, monnier@iro.umontreal.ca, gabriele@medialab.sissa.it Original-Received: via spool by 68827-done@debbugs.gnu.org id=D68827.170802793225463 (code D ref 68827); Thu, 15 Feb 2024 20:13:01 +0000 Original-Received: (at 68827-done) by debbugs.gnu.org; 15 Feb 2024 20:12:12 +0000 Original-Received: from localhost ([127.0.0.1]:57150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rai5c-0006cd-6G for submit@debbugs.gnu.org; Thu, 15 Feb 2024 15:12:12 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rai5Z-0006cO-WD for 68827-done@debbugs.gnu.org; Thu, 15 Feb 2024 15:12:10 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 775AA441645; Thu, 15 Feb 2024 15:11:45 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708027904; bh=JPHfpFOrF/JRYrCaADJZsei3SfC2/v+nOmBwz51lQ78=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Zz4xRhpr8abOUQt+hlSp/5uHBL3Zt9SSPxETd4S6A+lnLCy0IYg8auHL8W3zOewCb 7kAsoBQx1zVuvgcTbjT5Lj2wZCYcJ1a+7Ua5O7rSkVgapQPyhWRyBepfovklGZrkIZ ljxBT4cpyp1IF1ElNVcZkzybfQ7YXXSTdlEubl9TqHtpAZ11+0jrGxUpgyAqQRegpq TojjlIAI7gLNcnvZpocb2cDXQJnQv8ZeoO6ujWWtvJJP+PYb9HrCcoknSQW1rDNz/u BJIq6rx3LuRWnYwLRu2nDj7aBUN8tTbNMEG8MXz8L2DK5MwM8WexAwMytxc6bRiX9f OGuDdpgiNV8mA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 40BEE441628; Thu, 15 Feb 2024 15:11:44 -0500 (EST) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1DAE412033B; Thu, 15 Feb 2024 15:11:44 -0500 (EST) In-Reply-To: <457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it> (Gabriele Nicolardi's message of "Wed, 31 Jan 2024 20:56:12 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280080 Archived-At: > 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