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#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes Date: Mon, 18 Nov 2024 14:09:22 +0200 Message-ID: <86ldxgvj4d.fsf@gnu.org> References: <86v7wnh2bk.fsf@gnu.org> <86plmvf2mq.fsf@gnu.org> <86serqx5ba.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 74367@debbugs.gnu.org, stefankangas@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 18 13:10:29 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 1tD0aJ-0007yA-78 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Nov 2024 13:10:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tD0Zx-00035v-1i; Mon, 18 Nov 2024 07:10:05 -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 1tD0Zv-000349-A0 for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 07:10:03 -0500 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 1tD0Zu-0006iR-8w for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 07:10:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=FFxNRpe+ttTLRfwtWlbL6T7w3xq87UnphUl5fgZa+mU=; b=pgNMgLbHoM6t8svhy07J6++zXi9RkOok1Pjb9oVeHqi4XC59h7LL0hRfO/EY71FTJJk6f2KgVeu3NeoMbonxpEtnaztHlarYnEM5nCiQxvjw4yvrnJ1Uso86fGx5PgtTDYr/crzBFiG6LIiKPgGDqBRB6Q0c1SaNVNC9T6Y2Xss34BughnpC/xAKq9QPGLW26v54o0Nnr6Yt3qUvP5ohDEbH09U4BbuHRL21oy+YSms12BQKQCZmz2B49qFuXUQ/XFjHLrUZAlzoZ4Cs7IyAS9vdI3v+Lpib8Mi+OpCoPRCDaJsxi0i9gdAwNWRx6B95Ulo87KNqDXd9klEmzxJfig==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tD0Zt-0006iU-Tr for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 07:10:01 -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, 18 Nov 2024 12:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74367 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74367-submit@debbugs.gnu.org id=B74367.173193177525768 (code B ref 74367); Mon, 18 Nov 2024 12:10:01 +0000 Original-Received: (at 74367) by debbugs.gnu.org; 18 Nov 2024 12:09:35 +0000 Original-Received: from localhost ([127.0.0.1]:60289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tD0ZS-0006hY-Ji for submit@debbugs.gnu.org; Mon, 18 Nov 2024 07:09:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tD0ZQ-0006hK-1q for 74367@debbugs.gnu.org; Mon, 18 Nov 2024 07:09:33 -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 1tD0ZJ-0006fz-2T; Mon, 18 Nov 2024 07:09:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FFxNRpe+ttTLRfwtWlbL6T7w3xq87UnphUl5fgZa+mU=; b=XBdx2aI8ERT3 HHpjfCBOAXop+a+vP6lOOGTIdbCbUeoZVqrrxzmIlREsyztuKP2IA2PmDd8M5h5hlG2cr0deXEBPR sIigHsoxfE/ChX8nZkfhztRfXgeOl91SepX9P0OEp+ndIj+n/su3MlElkU7r5YnH3Haai1BZoizQ0 SC6FBlob6wqLydJvmBVM5b1YRAW91a9q8NUJL+1SIzC/tPL3KrZSWmDwaGgIEhPJoQiG7qHOdpP3K x3XZw+wb95lpGA3bincgoHWMPLUYcBQj7OySVcGtVRdfzpl307qGKMkHzSfjuee9qvtBWnl0wKC9k b5qympEPVMzuAj0WiR8Pfw==; In-Reply-To: (message from Stefan Monnier on Sun, 17 Nov 2024 17:19:28 -0500) 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:295588 Archived-At: > From: Stefan Monnier > Cc: stefankangas@gmail.com, 74367@debbugs.gnu.org, acm@muc.de > Date: Sun, 17 Nov 2024 17:19:28 -0500 > > So, for `emacs-30` I propose the patch below. > Any objection? No objections, provided that you replace (require 'c-ts-mode) with (load "c-ts-mode") since, as we now understand, just 'require' might not do anything. > @@ -1496,7 +1496,6 @@ c-or-c++-ts-mode > '(c++-mode . c++-ts-mode))) > > (when (treesit-ready-p 'c) > - (add-to-list 'major-mode-remap-defaults '(c++-mode . c++-ts-mode)) > (add-to-list 'major-mode-remap-defaults '(c-mode . c-ts-mode))) > > (when (and (treesit-ready-p 'cpp) Please leave this part alone in the meantime, as long as bug#74339 is being discussed and is not resolved. The resolution of that bug will also handle this nit.