From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.bugs Subject: bug#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Sat, 22 Jun 2024 18:14:54 +0200 Message-ID: <7030786.9J7NaK4W3v@fedora> References: <865xue1gtu.fsf@gnu.org> <4884041.OV4Wx5bFTl@fedora> <86a5jdgece.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart9726438.eNJFYEL58v" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16743"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71518@debbugs.gnu.org, casouri@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 22 18:17:22 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 1sL3QY-00049o-CO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jun 2024 18:17:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sL3QG-0002AM-D9; Sat, 22 Jun 2024 12:17:04 -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 1sL3QE-0002A7-VA for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 12:17:02 -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 1sL3QE-00027O-Au for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sL3QE-00031B-29 for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincenzo Pupillo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jun 2024 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71518 X-GNU-PR-Package: emacs Original-Received: via spool by 71518-submit@debbugs.gnu.org id=B71518.171907296511483 (code B ref 71518); Sat, 22 Jun 2024 16:17:02 +0000 Original-Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 16:16:05 +0000 Original-Received: from localhost ([127.0.0.1]:51308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL3PI-0002z9-GF for submit@debbugs.gnu.org; Sat, 22 Jun 2024 12:16:04 -0400 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:57446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL3PG-0002yc-F7 for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 12:16:03 -0400 Original-Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a6fd4d1c173so190967966b.2 for <71518@debbugs.gnu.org>; Sat, 22 Jun 2024 09:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719072897; x=1719677697; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IddkAt3+9l7E92wXU+eScgCkYGYKTk8F6xolwfkbRAQ=; b=l2my8wtLc+UQMn/ZSXdMWkKSdq+LhPWTb14hn9e4Q0dqFgJqtiphvvyghWNLbpYwHk yilAp5VAozw8Vv1ChOqXKqVArLINrRcB07+cYRmJ8J38D33xy2w1GXE6cxq7UsOE4Y6w C7QE0UaQIu79r/QidqHQR0qL0dKZQClzRk6pTQtg7C8Bo8r4yKn5K/Y5j6LtqiBaEVMb nC4ubX2EiPSpvs7PVojOf0CjoRI8HG72g7GjXpfk0BAVO9BNneVyAwUIF70RlQssc/XE fwCh00DYj8O5cluzW3u6b60bDDstCJaAb1Bv8lNOzcBwdIQCD3wN0zuZ4nVdcCPFUkgt 9Eew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719072897; x=1719677697; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IddkAt3+9l7E92wXU+eScgCkYGYKTk8F6xolwfkbRAQ=; b=JJG1ZdesOP50eCzFDG2Ir2u0iTJNSTeHfJ5feB/bACVIFfjaSJf53LKE8VveS89mMk cmzI7OPKuPNNkBUCTyeGMXGkKNV+6Gy6KTOvz5bNJgNdvy2RTPXIJznFjIjfxED03d2x JpX9UG99yoJyVxgc5ZKU5UFcrwK9fnlSeMlKaNw4Vxx17xcdslgeQFe3GyT3hV9WC3pg DL+jMjZTh1phQiDSpmCNbXA74gzycrr4LJoymitugbN/zhzUlW4OIFLBGCayDHkVZyNx TvIvrm8+fszvg7GXSfwCLRi6tWJOzwXICVtP9iQHVcEcTTmCX3CUXhSDtegwfYiYtbPf FEdg== X-Forwarded-Encrypted: i=1; AJvYcCWs6FdlGj+Y204+xC0moD3ao06mSd0zeHv3Ntk3BNuEEhVRZSkMQxqbh2zNvWsY2VOG5X97xhdtsyj4lAogwIFenRdFZR0= X-Gm-Message-State: AOJu0YwsS3zPMz8ivvHHKAy4deeNLfzVxIBjNiN7PJOu9lMBVTwsBEqH Ysodc8hlrv+4N45MngGkucKLBMnuCG9HgQSp73YhQgHH/5CKGSwC X-Google-Smtp-Source: AGHT+IFVBMHaTCYYrDFDbMLw2SW+CHTMn0KsFSTQm1JjiXu8n2UZeqfHjGAHkn036ExE5d4BEjQByQ== X-Received: by 2002:a17:906:2650:b0:a72:40aa:3a8e with SMTP id a640c23a62f3a-a7245b85710mr11625766b.43.1719072896397; Sat, 22 Jun 2024 09:14:56 -0700 (PDT) Original-Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fcf48a220sm212540966b.60.2024.06.22.09.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 09:14:56 -0700 (PDT) In-Reply-To: <86a5jdgece.fsf@gnu.org> 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:287719 Archived-At: This is a multi-part message in MIME format. --nextPart9726438.eNJFYEL58v Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" In data sabato 22 giugno 2024 17:57:21 CEST, Eli Zaretskii ha scritto: > > From: Vincenzo Pupillo > > Cc: 71518@debbugs.gnu.org > > Date: Sat, 22 Jun 2024 16:42:09 +0200 > > > > fortunately, this time it was easier than usual! > > Thanks, but this change will _require_ the new version of the grammar > library, right? I think we usually fix these problems in a way that > both the old and the new versions are supported, because people could > have different versions installed. In the tests I have done, it works with both the new and the old grammar. > > Could you please amend the fix along these lines? Okay, done. Can this be okay? Thanks. Vincenzo --nextPart9726438.eNJFYEL58v Content-Disposition: attachment; filename="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Fix-for-grammar-change-of-keyword-virtual-in-tree-si.patch" >From 5f88ff0001e8c4edb7519d1a85ebb13390d1a285 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Sat, 22 Jun 2024 16:22:16 +0200 Subject: [PATCH] Fix for grammar change of keyword "virtual" in tree-sitter-cpp The new rule works with both the new (>= 0.22.1) and the old (<= 0.22.0) grammar. * lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed the keyword "virtual". * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): New font lock rule. (Bug#71518) --- lisp/progmodes/c-ts-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index f453392ff7f..7bfb84baecb 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -572,7 +572,7 @@ c-ts-mode--keywords "not" "not_eq" "operator" "or" "or_eq" "override" "private" "protected" "public" "requires" "template" "throw" - "try" "typename" "using" "virtual" + "try" "typename" "using" "xor" "xor_eq")) (append '("auto") c-keywords)))) @@ -632,7 +632,8 @@ c-ts-mode--font-lock-settings :language mode :feature 'keyword - `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face + `((virtual) @font-lock-keyword-face + [,@(c-ts-mode--keywords mode)] @font-lock-keyword-face ,@(when (eq mode 'cpp) '((auto) @font-lock-keyword-face (this) @font-lock-keyword-face))) -- 2.45.2 --nextPart9726438.eNJFYEL58v--