From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ikumi Keita Newsgroups: gmane.emacs.bugs Subject: bug#61210: 28.2; Request to modify code which can accidentally overwrite AUCTeX function Date: Mon, 20 Mar 2023 21:25:12 +0900 Message-ID: <24110.1679315112@localhost> References: <13008.1675253596@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10028"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61210@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 20 13:26:19 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 1peEah-0002Mc-8k for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Mar 2023 13:26:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peEaU-0001fn-5t; Mon, 20 Mar 2023 08:26:06 -0400 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 1peEaR-0001ff-IF for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 08:26:04 -0400 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 1peEaQ-0001sR-S3 for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 08:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peEaQ-0006wG-L4 for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 08:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ikumi Keita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Mar 2023 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61210 X-GNU-PR-Package: emacs Original-Received: via spool by 61210-submit@debbugs.gnu.org id=B61210.167931511826616 (code B ref 61210); Mon, 20 Mar 2023 12:26:02 +0000 Original-Received: (at 61210) by debbugs.gnu.org; 20 Mar 2023 12:25:18 +0000 Original-Received: from localhost ([127.0.0.1]:53889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peEZi-0006vD-Dm for submit@debbugs.gnu.org; Mon, 20 Mar 2023 08:25:18 -0400 Original-Received: from smtp1a.inetd.co.jp ([210.129.88.11]:34884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peEZf-0006v3-ML for 61210@debbugs.gnu.org; Mon, 20 Mar 2023 08:25:16 -0400 Original-Received: from localhost (42-144-46-173.rev.home.ne.jp [42.144.46.173]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 514D15C; Mon, 20 Mar 2023 21:25:13 +0900 (JST) In-reply-to: Comments: In-reply-to Stefan Monnier message dated "Sat, 18 Mar 2023 18:35:05 -0400." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2 Content-ID: <24107.1679315111.1@localhost> 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:258287 Archived-At: Hi Stefan, >>>>> Stefan Monnier writes: > In Emacs-29 (see commit 18d75b4ab91fef6e344e612580088b714acfdb6e), the > above `defalias` are now predefined once and for all: > ;;;###autoload (defalias 'TeX-mode #'tex-mode) > ;;;###autoload (defalias 'plain-TeX-mode #'plain-tex-mode) > ;;;###autoload (defalias 'LaTeX-mode #'latex-mode) > It's still not ideal, but at least loading `tex-mode` won't override > any other definition such as AUCTeX's. Thanks, then AUCTeX can use LaTeX-mode etc. for names of its own major modes for emacs 29 and later. (I assume that it isn't problematic that AUCTeX overrides unconditionally them by `autoload' for them in the init code and (define-derived-mode LaTeX-mode text-mode "LaTeX" ...) or (defun LaTeX-mode () ...) later.) > I'd like to hear what you think about this "solution", both in the > short term and what we could try to do in the longer term (e.g. I'd > like to aim to get rid of those defaliases, but I'm not sure how to > get there progressively. I see that `major-mode-remap-alist' was also incorporated into emacs-29. So in short term, the conflicts between built-in modes and AUCTeX modes will reduce, and disappear when the least supported emacs version is raised to emacs-29. In the longer term, I think there's no practical problem regardless of existence of those aliases. 1. If they persist, AUCTeX changes the doc string for LaTeX-mode etc. in a brutal manner, but most ordinary users won't mind it. (Maybe it increases difficulty a bit in debug process? But I expect that drawback is small enough.) 2. The only reason that built-in tex-mode.el needs those aliases is, as you wrote in tex-mode.el, "for those users who may have files annotated with -*- LaTeX -*- (e.g. because they received them from someone using AUCTeX)." They can install AUCTeX even when those aliases are erased. Best regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine