On Tue, 2025-01-14 at 08:25 +0100, Arash Esbati wrote:
> Tim Ruffing <d...@real-or-random.org> writes:
> 
> > AUCTeX does the opposite. This means that after loading AUXTeX,
> > we'll
> > get this "funny" value for major-mode-remap-defaults:
> > 
> > ((doctex-mode . docTeX-mode)
> >  (latex-mode . LaTeX-mode)
> >  (texinfo-mode . Texinfo-mode)
> >  (plain-tex-mode . plain-TeX-mode)
> >  (tex-mode . TeX-tex-mode)
> >  (LaTeX-mode . latex-mode)
> >  (plain-TeX-mode . plain-tex-mode)
> >  (TeX-mode . tex-mode))
> > 
> > Now this is full chaos. If you set latex-mode in auto-mode-alist,
> > you'll get LaTeX-mode, and the other way around. (I mean, at least
> > Emacs stops after one remapping and doesn't enter infinite loop.)
> 
> I'm not sure if I follow.  Can you provide a recipe what and how you
> add
> an entry to `auto-mode-alist' that break things?  The value above
> might
> look funny, but AFAICT, it works.  I currently fail to see the chaos.
> 

Just with the defaults, without changing `auto-mode-alist' manually:

1. touch /tmp/test.drv
2. Start Emacs 30.93.2 with AUCTeX installed
3. Visit /tmp/test.drv
4. M-x describe-mode. The mode is latex-mode instead of LaTeX-mode

This is because AUCTeX this to `auto-mode-alist':
    ("\\.drv\\'" . LaTeX-mode) 

And then this remapping (new in Emacs 30) kicks in: 
    (LaTeX-mode . latex-mode)

I expect that the same will happen with any entry manually added to
`auto-mode-alist' if it specifies an AUCTeX mode.


Reply via email to