> Sent: Wednesday, September 21, 2022 at 3:58 AM > From: "Stefan Monnier" <monn...@iro.umontreal.ca> > To: "Tassilo Horn" <t...@gnu.org> > Cc: "David Kastrup" <d...@gnu.org>, auctex-devel@gnu.org > Subject: Re: AUCTeX and "builtin latex mode" integration > > >>> I wonder why/if it's important that the AUCTeX modes identify as the > >>> builtin modes, i.e., what would be the issue with having (La)TeX-mode > >>> major-modes which have no relationship to (la)tex-mode at all plus a > >>> setup command users would call in their init file in order to modify > >>> `auto-mode-alist' so that the AUCTeX modes are added? > >> > >> It might cause problems for people with `-*- latex -*-` in their > >> files. But other than that, it's also an option, indeed. > >> > >> Personally, I like the idea that `auto-mode-alist` (and mode cookies) > >> should describe the type of a file, rather than the specific mode to > >> use for it, but that's just me > > > > Could you elaborate a bit here? I can't quite follow. > > What I mean is that the entries in mode cookies and auto-mode-alist > (and magic-mode-alist, ...) should not say "use this specific mode" but > "use the mode which the user chose for files of this specific type". > > Emacs doesn't have the corresponding concept, so instead we use > `latex-mode` resp. `perl-mode` as "the name of the mode to use for LaTeX > resp. Perl files" and then we rely on hacks based on `defalias` or > `advice-add` to make that symbol point to the user's favorite mode for > that file type. > > > Anyway: where the actual complaints not more or less like "I want to > > use the stock tex/latex modes but also with cdlatex which requires the > > auctex package which then hijacks my editing"? > > No (BTW, `cdlatex` doesn't require AUCTeX any more).
There was discussion with Carsten of incorporating the cdlatex functianality into both built-in tex-mode & latex-mode; and Auctex. Could this be made to happen since we're at it. > > I think that wouldn't be a bad idea anyway (except for compatibility > > reasons) because nowadays we all agree that merely installing and > > loading a package should not have side-effects. > > Agreed. Maybe `AUCTeX-mode` should be a global minor mode which causes > `AUCTeX-minor-mode` to be enabled in the appropriate major modes.