Re: AUCTeX and "builtin latex mode" integration

2022-09-25 Thread Ikumi Keita
> Stefan Monnier writes: >> Oh, I see where that happens (and why it doesn't happen if we redirect >> with `defalias`). Sorry, I was talking based on my memory when I hacked `japanese-latex-mode' in tex-jp.el to deal with double loading issue. I forgot that `hack-one-local-variable' uses `ind

Re: AUCTeX and "builtin latex mode" integration

2022-09-25 Thread Stefan Monnier
> Oh, I see where that happens (and why it doesn't happen if we redirect > with `defalias`). Hmm... no I still can't reproduce it, even with something else than a defalias. Stefan

Re: AUCTeX and "builtin latex mode" integration

2022-09-25 Thread Stefan Monnier
Stefan Monnier [2022-09-25 10:01:40] wrote: >> 1. Suppose that the file has %%% mode:latex as file variable. When emacs >> opens this file, it runs `latex-mode' accordingly, which in turn runs >> AUCTeX `LaTeX-mode' by redirectiton. Then it sets `major-mode' to >> `LaTeX-mode'. After that, `hack-l

Re: AUCTeX and "builtin latex mode" integration

2022-09-25 Thread Stefan Monnier
> be a derived mode of `latex-mode'. However, defining `LaTeX-mode' by > (define-derived-mode LaTeX-mode latex-mode ...) would cause infinite > loop when redirection is enabled. Yes, it's ugly. That's part of the reason for the weird way we define `tex-mode` in `tex-mode.el` (and that was precede

Re: AUCTeX and "builtin latex mode" integration

2022-09-25 Thread Stefan Monnier
> 1. Suppose that the file has %%% mode:latex as file variable. When emacs > opens this file, it runs `latex-mode' accordingly, which in turn runs > AUCTeX `LaTeX-mode' by redirectiton. Then it sets `major-mode' to > `LaTeX-mode'. After that, `hack-local-variables' runs; it sees that > `major mode

Re: AUCTeX and "builtin latex mode" integration

2022-09-25 Thread Ikumi Keita
Hi Stefan and all, > Stefan Monnier writes: >> Then the idea of turning AUCTeX into minor mode itself does not help. > Not necessarily, but it could if we can arrange for latex-mode and > auctex-mode not to collide in their keymaps (and syntax table, ...), so > that entries added to `latex-m