-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use eglot--dbind for destructuring #171
Conversation
@joaotavora You mentioned that AFAICS, most interfaces are not exported. |
I couldn't find any more uses of |
* eglot.el (eglot--lsp-interface-alist): Add CodeAction, FileSystemWatcher, Registration, TextDocumentEdit, WorkspaceEdit. (eglot-handle-notification): Use eglot--dbind. (eglot--apply-workspace-edit): Use eglot--dbind and eglot--lambda. (eglot-code-actions): Use eglot--lambda. (eglot--register-workspace/didChangeWatchedFiles): Use eglot--lambda.
@mkcms This looks good, and by the way, is the way I would like to see it merged (adding interface specs little by little, and using The only thing that I am considering reviewing is the (eglot--dbind (foo bar baz) obj ...) Would do what (eglot--dbind ((TheFoo) foo bar baz) obj ...) Would do what What do you think? Regarding |
Looks good, I also wanted to propose getting rid of |
Regarding the
Or something like that. Or even use |
Sorry, I don't understand, should I ditch the |
No. It's just that it's not really ready yet. (for example, it uses So I'm going to do a simpler |
OK. Do you have a suggestion what I should use instead? I couldn't find anything in the Emacs sources for dynamic macro expansion. |
Macros are a black art (I'm not particularly good at them). But once you understand the macroexpander you should be able to generate code at macroexpansion-time without ever using I'm sorry if I can't be more help. If you write Stefan Monnier and explain the problem (or write to emacs-help with CC: to him), I'm sure he will help you with your problem. Anyway, as promised, I pushed a preliminary version (possibly buggy) of an |
Merged this after updating to the new |
@joaotavora So what about interfaces which are not |
They could be added to |
* eglot.el (eglot--dcase): New macro. * eglot-tests.el (eglot-dcase-with-interface) (eglot-dcase-no-interface): New tests.
* eglot.el (eglot--dcase): New macro. * eglot-tests.el (eglot-dcase-with-interface) (eglot-dcase-no-interface): New tests.
* eglot.el (eglot--dcase): New macro. * eglot-tests.el (eglot-dcase-with-interface) (eglot-dcase-no-interface): New tests. #171: joaotavora/eglot#171 ,#156: joaotavora/eglot#156
* eglot.el (eglot--dcase): New macro. * eglot-tests.el (eglot-dcase-with-interface) (eglot-dcase-no-interface): New tests. GitHub-reference: per joaotavora/eglot#171 GitHub-reference: per joaotavora/eglot#156
TextDocumentEdit, WorkspaceEdit.
(eglot--apply-workspace-edit): Use eglot--dbind.
(eglot-code-actions): Use eglot--lambda.