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

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

bug#23407: .dir-local settings get obliterated on running a major mode f


From: Stefan Monnier
Subject: bug#23407: .dir-local settings get obliterated on running a major mode function.
Date: Thu, 05 May 2016 08:54:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> (setq-local hack-local-variables--done t)
>> in hack-local-variables, and then testing that instead of testing
>> delay-mode-hooks?
> That's even more horrible.

Huh?  It makes it clear what's going on: the find-file part of the code
wants to make sure that hack-local-variables is called, so
hack-local-variables sets a var when it's called, and find-file checks
it to know whether that's been done or not.

It's reliable and contrary to the code you had, it doesn't need to care
about packages unrelated to find-file nor to hack-local-variables, nor
about variables which are similarly unrelated to find-file nor to
hack-local-variables.


        Stefan





reply via email to

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