Skip to content

Commit

Permalink
Fix #670: make eglot-current-server work in notification handlers
Browse files Browse the repository at this point in the history
* eglot.el (eglot--connect): Ensure `eglot--cached-server` bound
when calling notification/request methods.

#670: joaotavora/eglot#670
  • Loading branch information
joaotavora committed Apr 20, 2021
1 parent f06683d commit ae46189
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 ae46189

Please sign in to comment.