A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01501.html below:

Re: Calling another major mode in a major mode body

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Yuan Fu Subject: Re: Calling another major mode in a major mode body Date: Wed, 23 Nov 2022 10:36:22 -0800
> On Nov 22, 2022, at 6:46 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>> 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
> 

Yes, it’s much cleaner. If we don’t care too much about using advice in our 
source. I’ll do that instead.

Yuan


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4