[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown
From: |
Troy Brown |
Subject: |
bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown |
Date: |
Mon, 27 May 2024 10:32:01 -0400 |
On Mon, May 27, 2024 at 10:09 AM João Távora <joaotavora@gmail.com> wrote:
>
> Bugs are only "legitimate" when they are harming someone somewhere.
> This hook has been there for a number of years, and noone has complained
> that I can remember. If you have a use for the on-shutdown, then it's
> a bug. It'd help to know about this use case. If you don't have a use,
> it's just a doc bug, and patches welcome.
>
The use case is that I was experimenting with updating the
buffer-local indent-region-function (and indirectly
indent-line-function) to be based on eglot-format when the buffer was
connected to the language server. I was attempting to use the
eglot-managed-mode-hook so I could update these variables when the
Eglot buffer management changed. Since the hook wasn't being called
on shutdown it would still attempt to call eglot-format when it was no
longer managing the buffer. The workaround was to use a mode-specific
function for indent-region-function and then having that call
eglot-managed-p to determine if it should call eglot-format or
something else (e.g., indent-relative).
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, Troy Brown, 2024/05/15
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, Eli Zaretskii, 2024/05/25
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/26
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, Troy Brown, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, Troy Brown, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown,
Troy Brown <=
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, Felician Nemeth, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, Felician Nemeth, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, João Távora, 2024/05/27
- bug#70958: 30.0.50; eglot-managed-mode hooks not called on shutdown, Troy Brown, 2024/05/28