]> git.eshelyaron.com Git - emacs.git/commit
Also check types when destructuring lsp objects
authorJoão Távora <joaotavora@gmail.com>
Sat, 2 May 2020 09:30:28 +0000 (10:30 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sat, 2 May 2020 10:02:16 +0000 (11:02 +0100)
commitbbf8a0d0f65aecdd617ea2d07b7c9e7f4053a79c
treefdd5fb17ee008cb301d58cd58d45391532d2774b
parent60914d2ca402a26f099ab27564611bb4d7e22e67
Also check types when destructuring lsp objects

The problem in this issue is that the disambiguation between Command
and CodeAction objects can only be performed by checking the types of
the keys involved.  So we added that to the spec and check it at
runtime.

* eglot.el (eglot--lsp-interface-alist): Add types to
Command. Tweak docstring.
(eglot--check-object): Renamed from eglot--call-with-interface.
(eglot--ensure-type): New helper.
(eglot--interface): New helper.
(eglot--check-dspec): Renamed from eglot--check-interface.
(eglot--dbind): Simplify.
(eglot-code-actions): Adjust indentation.

* eglot-tests.el (eglot-dcase-issue-452): New test.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/452
lisp/progmodes/eglot.el