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#59816: [PATCH]: bug#59816: 29.0.60; c++-ts-mode handles one-line comments badly Date: Mon, 05 Dec 2022 15:01:16 +0200 Message-ID: <83sfhu80o3.fsf@gnu.org> References: <08257d6b-2426-bbdf-0ed4-edd161801ad6@gmail.com> <878rjmdnpa.fsf@thornhill.no> 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="15754"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59816@debbugs.gnu.org, geza.herman@gmail.com To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 05 14:02: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 1p2B79-0003qw-Qu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Dec 2022 14:02:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2B73-0008JI-9f; Mon, 05 Dec 2022 08:02:25 -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 1p2B6i-0008BP-H9 for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 08:02:12 -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 1p2B6g-00021g-AN for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 08:02:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2B6g-0000em-3Q for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 08:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Dec 2022 13:02: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.16702453102517 (code B ref 59816); Mon, 05 Dec 2022 13:02:02 +0000 Original-Received: (at 59816) by debbugs.gnu.org; 5 Dec 2022 13:01:50 +0000 Original-Received: from localhost ([127.0.0.1]:35894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2B6U-0000eX-AT for submit@debbugs.gnu.org; Mon, 05 Dec 2022 08:01:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2B6S-0000eR-EE for 59816@debbugs.gnu.org; Mon, 05 Dec 2022 08:01:48 -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 1p2B6L-0001vb-5Q; Mon, 05 Dec 2022 08:01:42 -0500 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=D43QJzkV0aaybXI4bi07Q6vQPJh7n2HboKIHykyTpv4=; b=bI58jc8RJQoVyw02O9zj /phND7FS4IuUZ+WzOtZ6u6HHpTGNcmqY97kmg+iuJVtTIRmszML6VlohLDl/gxxmUVjCqmR0BWM5u divyR3Bg4uA8ak4g+T/R7nxaluDbGyURo/ps2U2rT8rqULIzsIo6vk5m4oQyS7MN/C4OcFOHOk/zt e1yep25T61OlwttJ+PAojXA+XXfNoktAxreKCJMa9n8m29zv+syFG/QE8NYIMVU8LA2cYZFvXYQv+ HU8RrVwq9RfrLbRU/zbeoHv+IUVHCfBgSZ4H1O0dh0AiYhpxQw5rs4Vvz6DimsOZ+lkHKlWq+N3fz AIGbKYk6xVxJpQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2B6C-0000jV-8L; Mon, 05 Dec 2022 08:01:38 -0500 In-Reply-To: <878rjmdnpa.fsf@thornhill.no> (message from Theodor Thornhill on Mon, 05 Dec 2022 13:44:49 +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:250021 Archived-At: > From: Theodor Thornhill > Cc: geza.herman@gmail.com, eliz@gnu.org > Date: Mon, 05 Dec 2022 13:44:49 +0100 > > You're right. This is my bad. This patch addresses it. What do you > think, Eli? I'll defer to people who know more than I do about these modes. > BTW - I see that many modes in general don't refer to their > syntax-tables in their define-derived-mode form. Is that intentional? The ELisp manual says: -- Macro: define-derived-mode variant parent name docstring keyword-args... body... This macro defines VARIANT as a major mode command, using NAME as the string form of the mode name. VARIANT and PARENT should be unquoted symbols. The new command VARIANT is defined to call the function PARENT, then override certain aspects of that parent mode: [...] • The new mode has its own syntax table, kept in the variable ‘VARIANT-syntax-table’, unless you override this using the ‘:syntax-table’ keyword (see below). ‘define-derived-mode’ makes the parent mode’s syntax-table the parent of ‘VARIANT-syntax-table’, unless the latter is already set and already has a parent different from the standard syntax table. So there's no need to mention it because it happens automatically.