emacs-devel
[Top][All Lists]
Advanced

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

Re: Calling another major mode in a major mode body


From: Stefan Monnier
Subject: Re: Calling another major mode in a major mode body
Date: Tue, 22 Nov 2022 21:46:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> Thanks for that detailed explanation :-)
>
> It seems the current mode’s after-hook is ran the very last. So it might be
> a good place to call the fallback major mode. The call to run-hooks in
> a major mode invocation command is outside the scope delay-mode-hooks, so
> simply calling the fallback major mode should be fine?

I think even cleaner is if the dispatch can happen before we even call
`kill-all-local-variables`.

That's what `tex-mode` does (tho it gets there in a roundabout way
because I didn't want to change `define-derived-mode`).


        Stefan




reply via email to

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