diff options
| author | João Távora | 2023-04-19 00:59:17 +0100 |
|---|---|---|
| committer | João Távora | 2023-04-19 00:59:17 +0100 |
| commit | 9093834d0b590bc15ed994bd62f18f7b47a48f55 (patch) | |
| tree | 99d53255ef1ed9be40db3fa51508c72c252df559 /exec/exec.c | |
| parent | 08b480e13facadcd3a6d205d604deeeab4bbedc6 (diff) | |
| download | emacs-9093834d0b590bc15ed994bd62f18f7b47a48f55.tar.gz emacs-9093834d0b590bc15ed994bd62f18f7b47a48f55.zip | |
Eglot: unbreak activation/management of derived modes (bug#62907)
After recent changes to how LSP "languageId" is computed from major
modes and stored in the eglot-lsp-server object, the activation of the
'eglot--managed-mode' minor mode in modes _derived_ from some
major-mode mentioned in 'eglot-server-programs' was broken.
This commit restores that by introducing a new helper which uses the
same logic to provide the current-buffer's "languageId" to the server
and to discover if the server should manage the mode at all. This
ensures the two things stay in sync.
Also, this helper uses the function 'provided-mode-derived-p' to fix
this bug#62907.
* lisp/progmodes/eglot.el (eglot--languageId): New helper.
(eglot-current-server, eglot--TextDocumentItem): Use it.
Diffstat (limited to 'exec/exec.c')
0 files changed, 0 insertions, 0 deletions