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#70383: Conf-mode[toml] badly set face property Date: Mon, 15 Apr 2024 17:34:13 +0300 Message-ID: <867cgylmoq.fsf@gnu.org> References: <45347c16-6e54-4598-8ac9-33f56f65e106@gmail.com> <868r1fnb8k.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70383@debbugs.gnu.org, casouri@gmail.com, jostein@kjonigsen.net To: Alastair Irving , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 15 16:35:18 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 1rwNQS-00033d-9j for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Apr 2024 16:35:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwNQ4-0005Dh-Uu; Mon, 15 Apr 2024 10:34:52 -0400 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 1rwNQ2-0005Bi-So for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 10:34:50 -0400 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 1rwNQ2-0006sV-F7 for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 10:34:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rwNQE-0008KK-4i for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2024 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Apr 2024 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70383 X-GNU-PR-Package: emacs Original-Received: via spool by 70383-submit@debbugs.gnu.org id=B70383.171319168131847 (code B ref 70383); Mon, 15 Apr 2024 14:35:02 +0000 Original-Received: (at 70383) by debbugs.gnu.org; 15 Apr 2024 14:34:41 +0000 Original-Received: from localhost ([127.0.0.1]:37604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwNPs-0008HV-9a for submit@debbugs.gnu.org; Mon, 15 Apr 2024 10:34:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rwNPp-0008GF-Mm for 70383@debbugs.gnu.org; Mon, 15 Apr 2024 10:34:38 -0400 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 1rwNPX-0006lL-FM; Mon, 15 Apr 2024 10:34:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=IYjoIfbEtdzF1gCd2oqHGmoAGra/ilySHbuC97gPv4A=; b=BREdVitKnYBaAITP9v3k K8JNK+OMvmbm3HvqHmDW1RGbtfcnTvZCIM+c4NlE91QgaRPsZm1HvgNi1NutnxSl9Ml3f2sx2xlkA 1NDIE5WGOMVNxTSEGfb3JZXqoNVfaDHKUB7kAHShtDB4Tcj6yybEujC5LsxW4vrzOmSTLK+EzbWwT 8Eqg5gmhmVhkCpanLsjkWX2qjv5/kkSr7WEeEVzNQ6Omxp+WA+1ZOB+/m5e4cxO2SxI4pD5ULLjVl kfK0Kx26rcMfzcF6WtngEsKR7yHJU5luiV/9X//uXHekVEqmefOBVTk4zFAm15utzBerwx4MHjMFD +nDLGhzUS7/4Hg==; In-Reply-To: (message from Alastair Irving on Sun, 14 Apr 2024 20:59:02 +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:283380 Archived-At: > Date: Sun, 14 Apr 2024 20:59:02 +0100 > Cc: 70383@debbugs.gnu.org > From: Alastair Irving > > > I cannot reproduce this here, neither in Emacs 29 nor in Emacs 30. > > What version of the TOML grammar library are you using? > I don't think it's using a TOML grammar library, just conf-mode bundled > with EMACS "The major mode is Conf[TOML] mode defined in conf-mode.el".  > I think an extra newline was inserted in the TOML I pasted (in the > comment before the URL), it should be 4 lines total. I've attached the > exact file. Thanks. Does the patch below give good results (I don't have too many conf files around to test it). Stefan, does the fix look good to you? diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el index 5e16360..8a201bd 100644 --- a/lisp/textmodes/conf-mode.el +++ b/lisp/textmodes/conf-mode.el @@ -180,7 +180,7 @@ conf-font-lock-keywords (1 'font-lock-variable-name-face) (2 'font-lock-constant-face nil t)) ;; section { ... } (do this last because some assign ...{...) - ("^[ \t]*\\([^#=:\n]+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend)) + ("^[ \t]*\\([^[#=:\n]+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend)) "Keywords to highlight in Conf mode.") (defvar conf-javaprop-font-lock-keywords