>>>>> Stefan Monnier <monn...@iro.umontreal.ca> writes:
> I think the problem lies elsewhere: when the desktop file says "use
> `latex-mode`", how can we distinguish the two cases:

> - it's an "old" desktop file, so we should probably redirect it to
>   `LaTeX-mode`).
> - it's a "new" desktop file but the user really decided to use
>   `latex-mode` for that buffer so we should probably not redirect.

> Then again, in both cases it's not 100% sure what is the right choice,
> so maybe it doesn't matter that much what we do.

Understood.

>>>> d. Directory local variables
> Maybe the simplest option is to get used to the idea of setting
> `derived-mode-parent` manually for those modes which are "morally"
> a child mode, even though the implementation (and behavior) does not
> inherit much if anything?

Do you mean
(put 'LaTeX-mode 'derived-mode-parent 'latex-mode)
? In that case, `LaTeX-mode' can't have AUCTeX common TeX mode (in my
personal plan, `TeX-VirTeX-mode') as its parent. Is there any way to
assign multiple parent modes to `LaTeX-mode'?

[From your post to bug#61211]
> I'm also thinking that maybe `set-auto-mode` should remember the name
> of the "mode function" it called so we could consult this (in addition
> to the value of `major-mode`) when applying directory-local vars?

If that is possible, it will be a good solution.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine

Reply via email to