auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AUCTeX and "builtin latex mode" integration


From: Ikumi Keita
Subject: Re: AUCTeX and "builtin latex mode" integration
Date: Thu, 22 Sep 2022 18:33:37 +0900

Hi Stefan and all,

> I think it's on gnu.emacs.help, aka help-gnu-emacs.

I read the thread.

> It started with someone complaining that rainbow-delimiters doesn't work
> with LaTeX's braces, derived into AUCTeX-vs-plain because IIUC the
> problem was that they enabled the mode via `latex-mode-hook` which their
> AUCTeX doesn't run even though the mode describes itself as `latex-mode`.

Indeed. I learned people are often tempted to use `latex-' prefix to
customize the behavior of AUCTeX. It means that, in addition to
`latex-mode-hook', `latex-mode-map' and `latex-mode-syntax-table' (and
their counterparts of plain-tex-mode, texinfo-mode and doctex-mode) are
potential sources of similar confusion. :-(

Then the idea of turning AUCTeX into minor mode itself does not help.
Taking into account the discussion between Stefan and Tassilo, possible
candidates are either:
(a) In addition to being minor mode, AUCTeX uses lower case
    `latex-mode-hook', `latex-mode-map' and `latex-mode-syntax-table'.
    In this case, variable aliases `LaTeX-mode-hook' ->
    `latex-mode-hook' etc. would also be necessary for compatibility.
(b) AUCTeX abandons the relationship between `LaTeX-mode' and
    `latex-mode'. I.e. `LaTeX-mode' no longer pretends to be
    `latex-mode'.
    In this case,
      1. Users who have files with -*- latex -*- or 
         %%% mode: latex
         should explicitly add (defalias 'latex-mode 'LaTeX-mode) in
         their init files.
      2. AUCTeX installation process should create tex-site.el which
         modifies `auto-mode-alist' to associate ".tex" to
         `TeX-tex-mode'.
      3. If the site admin sets up site-start.el to load tex-site.el and
         an individual user of that site wants emacs built-in modes,
         that user should undo the modification to `auto-mode-alist' by
         the personal init file.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine



reply via email to

[Prev in Thread] Current Thread [Next in Thread]