From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74339: 30.0.92; CC Mode stomps C TS Mode Date: Thu, 14 Nov 2024 17:06:13 -0500 Message-ID: References: <868qtnfd2d.fsf@gnu.org> <86r07elwoh.fsf@gnu.org> <86h68al2qz.fsf@gnu.org> <8634jtk4gj.fsf@gnu.org> <86y11limbr.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19077"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: acm@muc.de, 74339@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 14 23:07:19 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 1tBhzj-0004pF-AK for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Nov 2024 23:07:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBhzT-0003Md-U0; Thu, 14 Nov 2024 17:07:04 -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 1tBhzS-0003L2-Gv for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 17:07:02 -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 1tBhzS-0000ga-1r for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 17:07:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=TXnjZBAAFn6jv91dwZwLtLA8CVMuma4d0H5yTEYqhos=; b=D0woFKxR2ZHId7rP78X7M1IZMc5xyy6XEToBaHqzZesl5BT1QyJWcGnNVa7eZ75sW5eqD7NkqJWPsAU5YhBglsYtE1Ed9O2bUJ0Oq8pJvxWbM6dg3v4DDf0BxHIHJd0AhrAt1jlctFTFJe91mR/TaKjSDeZByGehsf20W4+ou7h65Q03jHN+xOPS1MnnBolaxH/YL8jFlObzZcmBNmBPWycKlJoJUvNRxGIWvSTY+OABy0uZcqMY3rrSS7miDXbPkbaLW3o1RqKkhCMi6RNLPq2uFKpTDG28G8Of7Ot16ihpmfy38+9ZeJszhFGZPtOG/hSnQhsdnqGTqor099AFWg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBhzR-0006m3-Sd for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2024 17:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2024 22:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74339 X-GNU-PR-Package: emacs Original-Received: via spool by 74339-submit@debbugs.gnu.org id=B74339.173162198425977 (code B ref 74339); Thu, 14 Nov 2024 22:07:01 +0000 Original-Received: (at 74339) by debbugs.gnu.org; 14 Nov 2024 22:06:24 +0000 Original-Received: from localhost ([127.0.0.1]:47597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBhyp-0006kv-MB for submit@debbugs.gnu.org; Thu, 14 Nov 2024 17:06:23 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBhyo-0006kf-70 for 74339@debbugs.gnu.org; Thu, 14 Nov 2024 17:06:22 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 231BE100180; Thu, 14 Nov 2024 17:06:15 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731621974; bh=uJ6ruzPbTPmqgw3Vnu91w4dtQfPACEPAy7XukvTTJ2E=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pmHPRuOiDHXD91FdSjgkQzGI+EtFcvGKIBnyAzTU7A8wbufV3m0mtoKpvO8YlBjr0 RfB5VSJHIs/Gq8GHXHQjHMN4Euo0sYIxYdpkSYveFZBVLmfJEq9GXvRrMYFtRsCnvP DAdvRQxNLzYeCO79Q8zcH7shOCO2HxczEMgO536WDlO093PyRZv9s0xBa+nHTlOg4z lsVmKk4TziS/EwB9Mtc8aUY3Avwzfaj13FFOXiZfki9m28Jy4lf38DjyejAE3+NiFO /gTi2W+Zyq7XApV9DWmVHcV6MS77XgTTuj4FO89Evw2RXddJpmI6p+3Ivq0RLkiO0y nK36TBc3qdNKA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2DE14100043; Thu, 14 Nov 2024 17:06:14 -0500 (EST) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0B942120370; Thu, 14 Nov 2024 17:06:14 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Thu, 14 Nov 2024 15:58:49 -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:295371 Archived-At: BTW, we should also install a patch like the one below. Any objection? Stefan diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 3823c553fda..8d6e05f8008 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -33,31 +33,15 @@ ;; C/C++ header files. ;; ;; To use these modes by default, assuming you have the respective -;; tree-sitter grammars available, do one of the following: -;; -;; - If you have both C and C++ grammars installed, add -;; -;; (require 'c-ts-mode) -;; -;; to your init file. -;; -;; - Add one or mode of the following to your init file: +;; tree-sitter grammars available, +;; add one or more of the following to your init file: ;; ;; (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode)) ;; (add-to-list 'major-mode-remap-alist '(c++-mode . c++-ts-mode)) ;; (add-to-list 'major-mode-remap-alist '(c-or-c++-mode . c-or-c++-ts-mode)) ;; -;; If you have only C grammar available, use only the first one; if -;; you have only the C++ grammar, use only the second one. -;; -;; - Customize 'auto-mode-alist' to turn one or more of the modes -;; automatically. For example: -;; -;; (add-to-list 'auto-mode-alist -;; '("\\(\\.ii\\|\\.\\(CC?\\|HH?\\)\\|\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\|\\.\\(cc\\|hh\\)\\)\\'" -;; . c++-ts-mode)) -;; -;; will turn on the c++-ts-mode for C++ source files. +;; If you have only C grammar available, use only the first one; if +;; you have only the C++ grammar, use only the second one. ;; ;; You can also turn on these modes manually in a buffer. Doing so ;; will set up Emacs to use the C/C++ modes defined here for other