bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#57003: 28.1.90; Can local variables be loaded before loading major m


From: Stefan Monnier
Subject: bug#57003: 28.1.90; Can local variables be loaded before loading major mode?
Date: Sun, 30 Oct 2022 08:30:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Ihor Radchenko [2022-10-30 04:01:08] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Not really, no.  I have no doubt that there are various (in addition to
>>> the one you mention above).
>>
>> Looking at some of the related code, I had a feeling of "déjà vu":
>> `hack-local-variables-hook' indeed suffers from various gotchas
>> (starting with the non-intuitive name and the fact that it only
>> applies to file-visiting buffers)
>
> Does it mean that "Major modes can use this to examine user-specified
> local variables in order to initialize other data structure based on
> them." statement in the docstring of `hack-local-variables-hook' should
> be amended?

Good question, maybe it should be amended to point to
`after-change-major-mode-hook`?

>> , and I think my recommendation was out
>> of date: the better answer is to use `after-change-major-mode-hook` the
>> `:after-hook` thingy of `define-derived-mode`.
>
> Will it run before or after org-mode-hook?

It's run after setting file-local vars, which themselves are set after
running the mode hooks.







reply via email to

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