From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Removing unloaded functions from auto-mode-alist. Date: Wed, 20 Apr 2005 17:57:04 +0200 Message-ID: <85acntfnlb.fsf@lola.goethe.zz> References: <87zmvu6ba2.fsf@xs4all.nl> <85ll7e68ei.fsf@lola.goethe.zz> <854qe2ihhi.fsf@lola.goethe.zz> <87d5spxzml.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114019886 19016 80.91.229.2 (20 Apr 2005 17:58:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Apr 2005 17:58:06 +0000 (UTC) Cc: rms@gnu.org, Lute.Kamstra.lists@xs4all.nl, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 20 19:58:03 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOJR7-0001Wr-7r for ged-emacs-devel@m.gmane.org; Wed, 20 Apr 2005 19:56:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOJVf-0008OD-OO for ged-emacs-devel@m.gmane.org; Wed, 20 Apr 2005 14:01:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DOJTy-0007OI-0E for emacs-devel@gnu.org; Wed, 20 Apr 2005 13:59:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DOJTw-0007NN-2L for emacs-devel@gnu.org; Wed, 20 Apr 2005 13:59:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOJTv-0007Go-Rn for emacs-devel@gnu.org; Wed, 20 Apr 2005 13:59:23 -0400 Original-Received: from [151.189.21.47] (helo=mail-in-07.arcor-online.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DOJUM-0005lS-S4; Wed, 20 Apr 2005 13:59:51 -0400 Original-Received: from lola.goethe.zz (i53879BBD.versanet.de [83.135.155.189]) by mail-in-07.arcor-online.net (Postfix) with ESMTP id D024C1257BF; Wed, 20 Apr 2005 19:57:19 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id DEF521CE0B2E; Wed, 20 Apr 2005 17:57:04 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: <87d5spxzml.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 20 Apr 2005 11:02:36 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36178 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36178 Stefan Monnier writes: >> Any objection to removing those aliases? >> These names belong to AUCTeX and are just wrong in tex-mode.el. > >> I don't see any reason to consider them "wrong", or to think they >> "belong" to anything other than tex-mode.el. > > - tex-mode.el uses the "tex-" and "latex-" prefix for all its functions > and variables. > > - AUCTeX uses the "TeX-" and "LaTeX-" (and a few more) prefixes for all its > functions and variables. > > I think the above is a good reason why "TeX-mode" and "LaTeX-mode" belong to > AUCTeX rather than to tex-mode.el. > > So I think it's wrong for tex-mode.el to define > (defalias 'TeX-mode 'tex-mode) unless it explicitly intends to override the > AUCTeX definition. Which would be pretty pointless, since TeX-mode is never explicitly called by auto-mode-alist or mode specifications in files (which get downcased before getting applied), not even when AUCTeX is active. Indeed, AUCTeX's own TeX-mode function (which can recognize more formats than tex-mode.el) then calls plain-tex-mode, latex-mode, context-mode and so on based on its decision, so that the user's preference for tex-mode.el or AUCTeX can be decided by assigning the proper meaning to those function names, and those names only. Where a mode in AUCTeX is required functionally instead of as a user preference, again the mixed case variants are used. ConTeXt-mode, for example, is derived from plain-TeX-mode. The whole separation has been maintained rather meticulously. For historical reasons AUCTeX will need to override the mixed mode aliases in tex-mode.el, so there are no purely technical reasons that would require removing them. But I think that their presence in tex-mode.el is not a good idea since it encourages unsuspecting users to do things that will cause undesirable results when AUCTeX is installed in parallel. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum