From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68827: Possible solution Date: Sat, 10 Feb 2024 10:25:38 +0200 Message-ID: <86bk8ovi7x.fsf@gnu.org> References: <8204e83e-f660-4c7e-a966-2b0b111fa5e9@medialab.sissa.it> <457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5679"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68827@debbugs.gnu.org To: Gabriele Nicolardi , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 10 09:56:28 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 1rYj9w-0001Ih-3K for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Feb 2024 09:56:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYj9P-0001SK-Tw; Sat, 10 Feb 2024 03:55:55 -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 1rYj9J-0001H0-Oa for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:55:50 -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 1rYj9I-00036f-5g for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:55:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYj9X-0007uY-Jq for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:56:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Feb 2024 08:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68827 X-GNU-PR-Package: emacs Original-Received: via spool by 68827-submit@debbugs.gnu.org id=B68827.170755532130279 (code B ref 68827); Sat, 10 Feb 2024 08:56:03 +0000 Original-Received: (at 68827) by debbugs.gnu.org; 10 Feb 2024 08:55:21 +0000 Original-Received: from localhost ([127.0.0.1]:53637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYj8q-0007sC-Lj for submit@debbugs.gnu.org; Sat, 10 Feb 2024 03:55:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYj7g-0007mm-Fi for 68827@debbugs.gnu.org; Sat, 10 Feb 2024 03:54:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYig8-0006gm-O2; Sat, 10 Feb 2024 03:25:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1wH7Qyb68o4h6ySVb13h9M1u0HbMGua8F3UWCGUtboA=; b=mHYGg5cKY5Q2 PgGONoyfgG04uVtS+wYaXLhElgVMOihlAhhy8GgeF6jJwAvoRKjHWgr29pDhyV6NORizilRzHAbrb 2p3vpM2CcDOB6H5tWQE57DskCpZqwwZflo6yI1vcuui4taV44UwcrNch7JkdnZf5HNLDmALFU3pQn kMYebKCbYdUYzixN36QvonNsdSx4R2SCA14Npe2Km9+KTHq/zwoJX+4Zm4/NcQQnRRChy/x8tvimm A1LwW88Iw+CFVP4pLroBUDtVX4dsgg2mmfNuYRq8xV5mrgou1NPQ5h9jDGX2d8I8Iw72FpVEWH2mE v2T7hy1cl26oYRTT7gJ7LA==; In-Reply-To: <457c866d-d80c-4c5e-b4d4-f60fdf37992c@medialab.sissa.it> (message from Gabriele Nicolardi on 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:279730 Archived-At: > Date: Wed, 31 Jan 2024 20:56:12 +0100 > From: Gabriele Nicolardi > > 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?