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#71872: 30.0.60; [PATCH] c++-ts-mode: fontify destructor in c++-ts-mode Date: Mon, 01 Jul 2024 12:02:34 +0200 Message-ID: <2805600.vuYhMxLoTh@3-191.divsi.unimi.it> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart4981979.OV4Wx5bFTl" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4824"; mail-complaints-to="usenet@ciao.gmane.io" To: 71872@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 01 12:03:20 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 1sODsV-0000zk-PB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jul 2024 12:03:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sODsJ-0005ci-TQ; Mon, 01 Jul 2024 06:03:07 -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 1sODsE-0005bx-OK for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 06:03: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 1sODsE-0000RG-Fl for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 06:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sODsE-0003il-LC for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 06:03: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: Mon, 01 Jul 2024 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71872 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171982816314272 (code B ref -1); Mon, 01 Jul 2024 10:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Jul 2024 10:02:43 +0000 Original-Received: from localhost ([127.0.0.1]:60165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sODrv-0003i8-0I for submit@debbugs.gnu.org; Mon, 01 Jul 2024 06:02:43 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sODrs-0003hz-Mp for submit@debbugs.gnu.org; Mon, 01 Jul 2024 06:02:41 -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 1sODrr-0005Yg-PS for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 06:02:40 -0400 Original-Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sODrp-0000OJ-WD for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 06:02:39 -0400 Original-Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5858e973ef5so24981a12.0 for ; Mon, 01 Jul 2024 03:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719828156; x=1720432956; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=/8B7dOGN3o6+RRWN/jku2mne4sbTunzzwF6qQr8d8YE=; b=HEpIgEQjUhhZfiMLhfKjf8Bsu805f0k6VK1+wdqhtEOa0niK7M7m1LoH8dqHXvJ/qr oFkZXGRroknfXNW85L1dodVBhKpWn+bkpGK2UBt2cvyarhTw081gOkcp/0spPyDm2O7x PmPjqYBeMoy6HiUdFgEgKm7vH+F9oSvvQYSdsS4S4LDsEi+nFzG5uM6y6P8SBtajHM49 zye93KTUB+2m/meJyMZnkeyp+vr7KMsJCD4RnT3LZWyIRRTbB4laqvTvWHrp8NunFucC hmAiMsWmuLTZJi9a/A6rDgVcrf+Cv5ube9RmQaS7JQi4IMmCIPCUrCh8Gwaa2WI3fU9m ccZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719828156; x=1720432956; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/8B7dOGN3o6+RRWN/jku2mne4sbTunzzwF6qQr8d8YE=; b=arwp0fuwL3ZSjh659OZ/4zTx5+SishyA9khqgOf4BiR79QtlgpVG/Te8YRvRo49sgB uO3Y/Gt5cqWVILoTqn88ZszuVwh1H1Ti39/Nq69TPGQs97wHDFa4xQoP2O2nlQ+JLoYl hbDTzCRSprds1qcuBgF0UlprlK+3kdB3EnIUmJfMv0znKjOjJUwm3J4oaPwv1GCl8jd/ H4CyHhktWy5ZvJEsWpfDayYPSMgNeJ9Tkwahad6wnJF9wrsWP4vm6Dc2YD0aFr4HLF0m GaFLykEFN1BSSFgWNvB1bRHC4RmxLWf2JQqErfbegKJPx8XS52TNyArE6qU5ofePRlMJ HTsA== X-Gm-Message-State: AOJu0YxP54594xCrLe0vxhA6hzj/rMVilTy+7KmgYaK+YMZcXeem0Wi7 +Y53J86Lqz+OUCcK9+8fNXbgjm46yBiOnjTketU5oi4lzqRvQLk2Jx3aow== X-Google-Smtp-Source: AGHT+IGJy0Cb4TuG6C6oqt/1D8XtYX/4SXgNoV9vGZIrd6+oDVLLqn0/WoX1NInMPEfgx6H7yv9Rgw== X-Received: by 2002:a05:6402:1d53:b0:57c:dd3a:f399 with SMTP id 4fb4d7f45d1cf-5879f3ac31cmr4962801a12.12.1719828155774; Mon, 01 Jul 2024 03:02:35 -0700 (PDT) Original-Received: from 3-191.divsi.unimi.it (3-191.divsi.unimi.it. [159.149.3.191]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861381604asm4188252a12.45.2024.07.01.03.02.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 03:02:35 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=v.pupillo@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:288240 Archived-At: This is a multi-part message in MIME format. --nextPart4981979.OV4Wx5bFTl Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Ciao, this patch fontify destructor in c++ts-mode . This patch also works with emacs 31. Thanks. Vincenzo --nextPart4981979.OV4Wx5bFTl Content-Disposition: attachment; filename="0001-Fontify-destructor-in-c-ts-mode.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Fontify-destructor-in-c-ts-mode.patch" >From 61d4f75cff960955ed8e732757da514558b1cc94 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Mon, 1 Jul 2024 11:52:18 +0200 Subject: [PATCH] Fontify destructor in c++-ts-mode * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add a rule for destructor. --- lisp/progmodes/c-ts-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index e7f74fc53f2..2ac163d7a7e 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -674,7 +674,9 @@ c-ts-mode--font-lock-settings :language mode :feature 'definition ;; Highlights identifiers in declarations. - `((declaration + `(,@(when (eq mode 'cpp) + '((destructor_name (identifier) @font-lock-function-name-face))) + (declaration declarator: (_) @c-ts-mode--fontify-declarator) (field_declaration -- 2.45.2 --nextPart4981979.OV4Wx5bFTl--