emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/eglot 20195e5 42/69: On buffer kill, first send didClos


From: João Távora
Subject: [elpa] externals/eglot 20195e5 42/69: On buffer kill, first send didClose then teardown local structures
Date: Sun, 20 Oct 2019 08:21:49 -0400 (EDT)

branch: externals/eglot
commit 20195e57c9d1d3a5dab649513da6f335c483edb8
Author: Ingo Lohmar <address@hidden>
Commit: João Távora <address@hidden>

    On buffer kill, first send didClose then teardown local structures
    
    It used to be the reverse way around, which doesn't make sense.
    
    * eglot.el (eglot-managed-mode): Fix order in `kill-buffer-hook'
    
    Co-authored-by: João Távora <address@hidden>
---
 eglot.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 723ac3b..279fbee 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1172,8 +1172,9 @@ and just return it.  PROMPT shouldn't end with a question 
mark."
    (eglot--managed-mode
     (add-hook 'after-change-functions 'eglot--after-change nil t)
     (add-hook 'before-change-functions 'eglot--before-change nil t)
-    (add-hook 'kill-buffer-hook 'eglot--signal-textDocument/didClose nil t)
     (add-hook 'kill-buffer-hook 'eglot--managed-mode-onoff nil t)
+    ;; Prepend "didClose" to the hook after the "onoff", so it will run first
+    (add-hook 'kill-buffer-hook 'eglot--signal-textDocument/didClose nil t)
     (add-hook 'before-revert-hook 'eglot--signal-textDocument/didClose nil t)
     (add-hook 'before-save-hook 'eglot--signal-textDocument/willSave nil t)
     (add-hook 'after-save-hook 'eglot--signal-textDocument/didSave nil t)



reply via email to

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