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#74367: [PATCH] c-ts-mode.el: Adjust doc about how to change default modes Date: Sat, 16 Nov 2024 15:26:31 -0500 Message-ID: References: <86v7wnh2bk.fsf@gnu.org> <86plmvf2mq.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="9966"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: acm@muc.de, 74367@debbugs.gnu.org, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 16 21:27: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 1tCPOC-0002RL-Ou for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Nov 2024 21:27:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCPNr-000182-F1; Sat, 16 Nov 2024 15:27:07 -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 1tCPNm-00017t-Kq for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 15:27: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 1tCPNm-0007I8-Ck for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 15:27: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=vnjwly4cjVE0WOMuw5EN8vohcdgBB42+9uvLQAmhidA=; b=Pjer6t8ZkVdNQRXKPFKPs6bREwBPAujwvRQG+jMPXRqKumU/3jLHMdMuI/2Lj52AuZ11uTgbQ+GDMhZ4nkIR0TQT69YBQ9AqYHGpPxdunjjkcrL5NOsRSDPJ20798KjsX+sUU4Ydv9qkvXZ2uV4ujJgIIqpCcsqWRSQl310AJbTKNvxpofR+GpVysvAxTqFWShJ4Tn8ddk3TkwOUdOFEDJfZkocAigXEhYM+ZqG9cD974nQfdkj/7ePcbFnklDojwXxqiX2S5XIE3DObL3Kjf1cc82Xw9qvgzsPUyhYAHA6VI21cq5jIhnBEOkZr4SVR/DGSiH/Zmr2QxmleTSJ+eQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCPNm-0005fB-4A for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 15:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2024 20:27:02 +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.173178881221752 (code B ref 74367); Sat, 16 Nov 2024 20:27:02 +0000 Original-Received: (at 74367) by debbugs.gnu.org; 16 Nov 2024 20:26:52 +0000 Original-Received: from localhost ([127.0.0.1]:54929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCPNb-0005em-Uf for submit@debbugs.gnu.org; Sat, 16 Nov 2024 15:26:52 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCPNZ-0005eS-Bk for 74367@debbugs.gnu.org; Sat, 16 Nov 2024 15:26:50 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1BABA100180; Sat, 16 Nov 2024 15:26:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731788801; bh=7sAftMXB5AmrlByumTqXyNIFX/PKKV6y5b2Cwze9Iwo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iR4oHKKmiueMifQjA7aYu/NM/3bKBR6NSFkherkWlDdRbomKFIwqV2emEB2TzcTTz pvOBxYLuOl1gzMQPPe5n/FBLQEHkVnpYup8EsYsNiRPMCLB4wjvS6ODcglfS4Y6srH UeWhyVGdJBxLL86ZKlrVgV48wCknH86dOV38QDxHjdSdEwm9hYC/P7KmpePcX3wF5W n34dHMFuoLrqT1eB7CrYFjWJ2ZHNePErnF31XfFUYDL8csHY+LmMrWUWeXrducwwhE 9EIf3N5ucd7hKKtQlMcExrf7meSVLLKTXv+zx44Eo0ybmHNZ9CGc7KIGcO8lMzsbyK vA/InHf0EX+/A== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 455D6100043; Sat, 16 Nov 2024 15:26:41 -0500 (EST) Original-Received: from alfajor (modemcable005.21-80-70.mc.videotron.ca [70.80.21.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1E8C512041A; Sat, 16 Nov 2024 15:26:41 -0500 (EST) In-Reply-To: <86plmvf2mq.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Nov 2024 20:35:25 +0200") 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:295491 Archived-At: >> I don't understand why you insist on suggesting such a "setting" since >> it's unreliable now and probably even more so in the future. > Because that's what users did in Emacs 29. I don't want us to make an > impression it no longer works. In Emacs-29, it did work, because it modified `auto-mode-alist` and CC-mode never modified it back. In `emacs-30`, it doesn't work reliably any more because loading `cc-mode.el` after `c-ts-mode.el` causes the default mode to revert to `c-mode`. Loading `cc-mode.el` happens when you do `C-h f c-mode RET`, or when you load a file that requires it, e.g.: lisp/cedet/semantic/bovine/c.el:(eval-when-compile (require 'cc-mode)) lisp/generic-x.el:(require 'cc-mode) lisp/org/ob-C.el:(require 'cc-mode) lisp/org/ob-fortran.el:(require 'cc-mode) lisp/progmodes/antlr-mode.el:(require 'cc-mode) lisp/progmodes/cc-mode.el:;; (require 'cc-mode) lisp/progmodes/cmacexp.el:(require 'cc-mode) lisp/progmodes/csharp-mode.el:(require 'cc-mode) lisp/progmodes/cwarn.el:(require 'cc-mode) lisp/progmodes/hideif.el:(require 'cc-mode) lisp/progmodes/js.el:(require 'cc-mode) or: ../elpa/packages/csharp-mode/csharp-mode.el:(require 'cc-mode) ../elpa/packages/electric-spacing/electric-spacing.el:(require 'cc-mode) ../elpa/packages/gnome-c-style/gnome-c-align.el:(require 'cc-mode) ../elpa/packages/javaimp/javaimp-parse.el:(require 'cc-mode) ;for java-mode-syntax-table ../elpa/packages/vcl-mode/vcl-mode.el:(require 'cc-mode) ../nongnu/packages/arduino-mode/arduino-mode.el:(require 'cc-mode) ../nongnu/packages/bison-mode/bison-mode.el:(require 'cc-mode) ../nongnu/packages/d-mode/d-mode.el:(require 'cc-mode) ../nongnu/packages/php-mode/lisp/php.el: (require 'cc-mode) ../nongnu/packages/php-mode/lisp/php-mode-debug.el:(require 'cc-mode) ../nongnu/packages/php-mode/lisp/php-mode.el:(require 'cc-mode) ../nongnu/packages/scad-mode/scad-mode.el:(require 'cc-mode) ../nongnu/packages/typescript-mode/typescript-mode.el: (require 'cc-mode) Also we're discussing changing `c-ts-mode.el` so loading it doesn't have that effect at all, which means that there's a good chance it will work even less well in the future. So to me it's clear that suggesting the use of `require` or `load` to change the default C mode is doing a disservice to our users. Stefan