auctex-devel
[Top][All Lists]
Advanced

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

activating LaTeX-mode automatically


From: Paul Nelson
Subject: activating LaTeX-mode automatically
Date: Sun, 30 Jun 2024 20:45:14 +0200

What's the recommended way nowadays to activate LaTeX-mode
automatically upon opening a tex file?  I would have thought that

(use-package tex
  :ensure auctex
  :mode ("\\.tex\\'" . LaTeX-mode))

which adds the appropriate entry to auto-mode-alist, would suffice,
but it doesn't with the latest Emacs and AUCTeX masters.  The issue is
that an autoload in tex-mode.el adds the entry (latex-mode .
LaTeX-mode) to major-mode-remap-alist, but AUCTeX doesn't seem to
remove that entry.  There's some relevant code in the function
TeX-modes-set in tex-site.el, but I wasn't able to figure out when
that code is called.

My workaround has been (add-hook 'latex-mode #'LaTeX-mode), but I was
curious if something else is intended.



reply via email to

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