From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.help Subject: Re: Mode hooks for latex and tex files Date: Mon, 02 Dec 2024 21:38:33 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 21:39:31 2024 Return-path: Envelope-to: geh-help-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 1tIDCb-00077J-QT for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 21:39:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIDBq-0001Vo-CY; Mon, 02 Dec 2024 15:38:42 -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 1tIDBm-0001Vd-O4 for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 15:38:38 -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 1tIDBl-0004np-2a; Mon, 02 Dec 2024 15:38:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=fWVgv5RTsnqYcvwKdn7LHQwD8JBt49xQdAQButBhQDQ=; b=bmyCpudbl/BSnQHHTaZU bBcOVgEjHDOpI/UtHHsfF0psthSU+DklI/wgzIaYzzZKVuLBNBjuO8XUs1zTj5Z6nyjXOa4kpSIoK 6CY8GSA/46HV81ZZwlyQzjSgh83ctI/F4G9pYXyDSfG60S7fukGrWzcJZ+YBZGzKN+F5ShnJ1Dr6l bmbchCIZnxc8EE+GwJe9y2QxQSDF/h6O57O8dsj/h4zM5AqHCUX51897m8kBIR8NnPEBFVwDgCnG0 4uDsJsYtl0eitrTxyLCINpQ5VVi05eQZ1d+5QhbxOr6qcigMhvdWn7G1QRT6oVEBhx7lnA15f+n4P h8GJL45IqVhgZg==; In-Reply-To: (Heime's message of "Mon, 02 Dec 2024 20:29:34 +0000") X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148503 Archived-At: Heime writes: > On Tuesday, December 3rd, 2024 at 8:17 AM, Arash Esbati wrote: > >> The mode names above (and the corresponding hooks) are all defined in >> tex-mode.el which is distributed with Emacs; they don't belong to >> AUCTeX: >> >> $ grep define-derived-mode tex-mode.el >> (define-derived-mode tex-mode text-mode "generic-TeX" >> (define-derived-mode plain-tex-mode tex-mode "TeX" >> (define-derived-mode latex-mode tex-mode "LaTeX" >> (define-derived-mode slitex-mode latex-mode "SliTeX" >> (define-derived-mode tex-shell shell-mode "TeX-Shell" >> (define-derived-mode doctex-mode latex-mode "DocTeX" >> >> As you can see, tex-mode.el breaks every "rule" you think you're >> describing with "typical package-prefixed predicate style". A "mylib-" >> prefix might be a natural choice for single file libraries, but it isn't >> a must as long you get the prefix right. > > Correct, it breaks every rule. Instead of a prefix, the AUCTeX developers > decided upon a camel-case variant. Their package does not fit nicely with > emacs development preferred way. I don't how often I have to repeat this: tex-mode.el is part of Emacs and not part of AUCTeX: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/textmodes/tex-mode.el And AFAICT, it does the job right. Best, Arash