[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mode hooks for latex and tex files
From: |
Heime |
Subject: |
Re: Mode hooks for latex and tex files |
Date: |
Mon, 02 Dec 2024 16:15:23 +0000 |
Sent with Proton Mail secure email.
On Tuesday, December 3rd, 2024 at 3:58 AM, Heime <heimeborgia@protonmail.com>
wrote:
> On Tuesday, December 3rd, 2024 at 1:17 AM, Arash Esbati arash@gnu.org wrote:
>
> > Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org
> > writes:
> >
> > > What are the mode hooks for latex and tex files?
> >
> > It depends.
> >
> > > Using latex and tex is currently very non-intuitive, with things
> > > like LaTex-mode, TeX-mode. This mixed capitalisation is all too
> > > confusing because ordinary users see only a latex or tex configuration
> > > for their modes, rather than the nuances of capitalisation changes.
> >
> > The only point you have to consider is that there are 2 major modes for
> > editing plain-tex and latex files:
> >
> > • The modes bundled with Emacs (in tex-mode.el, do
> > 'M-x locate-library RET tex-mode RET') and
> >
> > • the modes provided by AUCTeX (a package you must install from ELPA
> > first).
> >
> > If you're using the former, use `plain-tex-mode-hook' or` latex-mode-hook',
> > and with the latter, set `plain-TeX-mode-hook' or` LaTeX-mode-hook'.
> >
> > `tex-mode-hook' and` TeX-mode-hook' are sort of meta-modes and not
> > intended for end users, so don't set them.
> >
> > Best, Arash
>
>
> AUCTeX introduces unnecessary complexity by deviating from standard
> naming conventions for tool-related modes. Instead of adhering to the
> typical package-prefixed predicate style (e.g., auctex-tex-mode and
> auctex-latex-mode), it opts for inconsistent and unintuitive names.
>
> The use of plain-tex-mode instead of a unified tex-mode (as seen with
> latex-mode) adds further redundancy. Meta-modes not intended for
> direct user interaction should avoid using intuitive and general names
> like tex-mode, reserving such names for user-facing
> functionality. This inconsistency is unique to AUCTeX; other language
> tools, such as for C, avoid analogous confusion—there is no equivalent
> plain-c-mode.
I am also interested in the made hooks. Would the built-in be
plain-tex-mode-hook
and latex-mode-hook ? Is there also tex-mode-hook ?