From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60888: 29.0.60; Lost c-or-c++-ts-mode Date: Fri, 20 Jan 2023 09:57:09 +0200 Organization: LINKOV.NET Message-ID: <86mt6d4o3e.fsf@mail.linkov.net> References: <36C3AE10-1F2E-428D-AE5B-2ADF1732433C@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33778"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 60888@debbugs.gnu.org, Dmitry Gutov To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 20 09:21:36 2023 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 1pImeW-0008er-Cw for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Jan 2023 09:21:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIme7-0003ys-Pp; Fri, 20 Jan 2023 03:21:11 -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 1pImdz-0003xa-CF for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 03:21:03 -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 1pImdy-0003qw-7k for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 03:21:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pImdy-0001S5-3Z for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 03:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2023 08:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60888 X-GNU-PR-Package: emacs Original-Received: via spool by 60888-submit@debbugs.gnu.org id=B60888.16742028055485 (code B ref 60888); Fri, 20 Jan 2023 08:21:02 +0000 Original-Received: (at 60888) by debbugs.gnu.org; 20 Jan 2023 08:20:05 +0000 Original-Received: from localhost ([127.0.0.1]:45363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pImd2-0001QO-JG for submit@debbugs.gnu.org; Fri, 20 Jan 2023 03:20:04 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:41795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pImcy-0001PW-Sz; Fri, 20 Jan 2023 03:20:01 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 17A02C0003; Fri, 20 Jan 2023 08:19:52 +0000 (UTC) In-Reply-To: <36C3AE10-1F2E-428D-AE5B-2ADF1732433C@gmail.com> (Yuan Fu's message of "Thu, 19 Jan 2023 13:57:17 -0800") 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:253753 Archived-At: close 60882 29.0.60 close 60888 29.0.60 thanks >>> I started to rely on c-or-c++-ts-mode because there is no other replacement >>> to use for such mappings in init files: >>> (when (and (treesit-ready-p 'c t) (treesit-ready-p 'cpp t)) >>> (add-to-list 'major-mode-remap-alist '(c-or-c++-mode . c-or-c++-ts-mode))) >>> c-or-c++-mode is activated for all .h files, so there should be the >>> corresponding >>> c-or-c++-ts-mode, but it's lost somewhere in emacs-29. >> >> Apparently it was decided that it's a new feature, and thus too late >> for emacs-29. > > I added it back. It really is a bug preventing one to use c(++)-ts-mode > on header files. So this should be fine to add. Plus I mostly just > copy-pasted from cc-mode. Sorry for the back-and-forth. Thanks, so now closing. PS: It's nice that you added such instructions to the commentary and docstrings: ;; (add-to-list 'major-mode-remap-alist '(c-or-c++-mode . c-or-c++-ts-mode)) Maybe it should be sufficient for emacs-29 and better than updating user's auto-mode-alist automatically.