Skip to content

Commit

Permalink
Fix joaotavora/eglot#670: make eglot-current-server work in notificat…
Browse files Browse the repository at this point in the history
…ion handlers

* eglot.el (eglot--connect): Ensure `eglot--cached-server` bound
when calling notification/request methods.
  • Loading branch information
joaotavora committed Apr 20, 2021
1 parent c2a0634 commit 814dee2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/progmodes/eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,8 @@ This docstring appeases checkdoc, that's all."
(format "*%s stderr*" readable-name))
:file-handler t)))))))
(spread (lambda (fn) (lambda (server method params)
(apply fn server method (append params nil)))))
(let ((eglot--cached-server server))
(apply fn server method (append params nil))))))
(server
(apply
#'make-instance class
Expand Down

0 comments on commit 814dee2

Please sign in to comment.