[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dir-Locals + Editorconfig Changes in Emacs 26
From: |
Eli Zaretskii |
Subject: |
Re: Dir-Locals + Editorconfig Changes in Emacs 26 |
Date: |
Wed, 04 Oct 2017 20:00:16 +0300 |
> From: Jay Kamat <jaygkamat@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 04 Oct 2017 11:45:45 -0400
>
> > Could it be that the major mode hook is now called twice, and
> > Editorconfig fails to notice that one of these calls is to turn the
> > mode off?
>
> Is `after-change-major-mode' getting called twice in emacs 26, but not
> 25?
No, the mode is called twice, first time to turn it off, then to turn
it on. The mode hook is also called twice, for the same reason. I
don't know what that means for after-change-major-mode functions, but
maybe they are also called twice
> I can't seem to find a related news entry about the change, could
> you point me to more information about that?
I have no more information about that than what I told. You should be
able to see whether after-change-major-mode is called twice by putting
some message there, or with Edebug.
> I took a look at the implementation of `after-change-major-mode', and I
> found `change-major-mode-after-body-hook' nearby, which seems to do what
> I want at a first glance (running hooks before dir-locals is set). Does
> changing the hook seem like the proper way to solve this?
Sorry, I don't know, since I have no idea what editorconfig wants to
do.