]> git.eshelyaron.com Git - emacs.git/commit
Handle managed buffers in own process var
authorJoão Távora <joaotavora@gmail.com>
Sat, 19 May 2018 15:50:09 +0000 (16:50 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sat, 19 May 2018 16:13:10 +0000 (17:13 +0100)
commit490ad2ce0b25cacf9e534af8d9c1ceadba6ddbe2
tree53367912e34e2a61d339f2074c8c86f9f871e86d
parent5b8aa5c90851528bc8a04aaefc891fff6be6846b
Handle managed buffers in own process var

This should save some trouble when testing noninteractively.  Because
eglot--shutdown didn't turn off the minor mode, test code running
immediately after it could still make didClose requests, for example.
The sentinel was the previous responsible for turning off the minor
mode and didn't get a chance to run in that case. Now eglot--shutdown
is also responsible for turning off the minor mode.

All this should be hidden behind eglot--managed-mode-onoff.

* eglot.el (eglot--managed-buffers): New process-local variable.
(eglot--process-sentinel): Turn off managed mode.
(eglot--managed-mode-onoff): New function.
(eglot--managed-mode): Don't offer to kill server here.
(eglot--buffer-managed-p): Remove.
(eglot--maybe-activate-editing-mode): Activate mode here.
(eglot-shutdown): Turn off minor mode here.
(eglot--server-window/progress): Simplify slightly.
lisp/progmodes/eglot.el