From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59816: [PATCH]: bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly Date: Tue, 06 Dec 2022 08:00:56 +0100 Message-ID: References: <08257d6b-2426-bbdf-0ed4-edd161801ad6@gmail.com> <878rjmdnpa.fsf@thornhill.no> <83sfhu80o3.fsf@gnu.org> <87y1rmvveh.fsf@thornhill.no> <0546f952-a765-2c59-1655-b15da41d6d25@gmail.com> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casuri@gmail.com, 59816@debbugs.gnu.org To: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 06 08:03:32 2022 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 1p2RzH-0000g4-7g for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Dec 2022 08:03:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2Rys-0005QS-3S; Tue, 06 Dec 2022 02:03:06 -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 1p2Ryp-0005QH-0j for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 02:03:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2Ryo-0008Bu-EV for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 02:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2Ryo-0003jh-4p for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 02:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 07:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59816 X-GNU-PR-Package: emacs Original-Received: via spool by 59816-submit@debbugs.gnu.org id=B59816.167031012414353 (code B ref 59816); Tue, 06 Dec 2022 07:03:02 +0000 Original-Received: (at 59816) by debbugs.gnu.org; 6 Dec 2022 07:02:04 +0000 Original-Received: from localhost ([127.0.0.1]:41089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2Rxs-0003jR-9S for submit@debbugs.gnu.org; Tue, 06 Dec 2022 02:02:04 -0500 Original-Received: from out-87.mta0.migadu.com ([91.218.175.87]:43632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2Rxp-0003j4-5K for 59816@debbugs.gnu.org; Tue, 06 Dec 2022 02:02:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670310119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yA39g4tYG7+e8bYJweih6GwR4INRNBxqN7N4/7rf58c=; b=Ud81+g5p+b9g9bpoylvZgDcSTBP0A7N7uh5P4qcO2KMK9Kize+X5gg07QUc+NloPtz6BvS u0hjS1VgoJbh2VsKqndO9BJFoXhSk2WbjC03MYT2q9manBjV+3qkX9QlUP8eLJWzF4gpGc ijEt8DyGUleC4X7+JN0ujZeH4kE5kKn6woPtMFAd7kHkNkLRC1LijsZ03xKZekByNr5cHL jFW1+uKzFn4DIBDKUxa5C9mJ9OzZFbl5PPuHDtx8MrwicSYHl2zX8lHWhp07HFNeRfRzb8 RdwHgsyQhlKrR/s/shh0YrYCdzZb3s3zBmlbm17k6pnkeujJjDxIz9Tq5qsNQA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <0546f952-a765-2c59-1655-b15da41d6d25@gmail.com> X-Migadu-Flow: FLOW_OUT 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:250090 Archived-At: On 6 December 2022 00:16:53 CET, "Herman, G=C3=A9za" wrote: >Hi Theo, yes, it works correctly with your patch, thanks! > >On 12/5/22 14:21, Theodor Thornhill wrote: >> Eli Zaretskii writes: >>=20 >>>> From: Theodor Thornhill >>>> Cc: geza=2Eherman@gmail=2Ecom, eliz@gnu=2Eorg >>>> Date: Mon, 05 Dec 2022 13:44:49 +0100 >>>>=20 >>>> You're right=2E This is my bad=2E This patch addresses it=2E What = do you >>>> think, Eli? >>> I'll defer to people who know more than I do about these modes=2E >>>=20 >> Sure, added Yuan to CC=2E >>=20 >>>> BTW - I see that many modes in general don't refer to their >>>> syntax-tables in their define-derived-mode form=2E Is that intention= al? >>> The ELisp manual says: >>>=20 >>> -- Macro: define-derived-mode variant parent name docstring >>> keyword-args=2E=2E=2E body=2E=2E=2E >>> This macro defines VARIANT as a major mode command, using NAME a= s >>> the string form of the mode name=2E VARIANT and PARENT should b= e >>> unquoted symbols=2E >>>=20 >>> The new command VARIANT is defined to call the function PARENT, >>> then override certain aspects of that parent mode: >>>=20 >>> [=2E=2E=2E] >>>=20 >>> =E2=80=A2 The new mode has its own syntax table, kept in the = variable >>> =E2=80=98VARIANT-syntax-table=E2=80=99, unless you override= this using the >>> =E2=80=98:syntax-table=E2=80=99 keyword (see below)=2E =E2= =80=98define-derived-mode=E2=80=99 >>> makes the parent mode=E2=80=99s syntax-table the parent of >>> =E2=80=98VARIANT-syntax-table=E2=80=99, unless the latter i= s already set and >>> already has a parent different from the standard syntax tab= le=2E >>>=20 >>> So there's no need to mention it because it happens automatically=2E >> Right, thanks! >>=20 >> Can you test this patch, Herman, and see if it works for you now? >>=20 >> Theo > Nice, thanks for testing! Yuan, will you apply this patch? Theo