[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 65aadca 46/49: Fix #620: simplify eglot--apply-wo
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot 65aadca 46/49: Fix #620: simplify eglot--apply-workspace-edit |
Date: |
Wed, 17 Mar 2021 18:41:51 -0400 (EDT) |
branch: externals/eglot
commit 65aadca313c07f93c11578520b2740eb52f2ddfd
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix #620: simplify eglot--apply-workspace-edit
Suggested by Brian Leung.
* eglot.el (eglot--apply-workspace-edit): simplify
---
eglot.el | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/eglot.el b/eglot.el
index 964658a..f7632cb 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2530,8 +2530,7 @@ is not active."
(eglot--dbind ((VersionedTextDocumentIdentifier) uri
version)
textDocument
(list (eglot--uri-to-path uri) edits version)))
- documentChanges))
- edit)
+ documentChanges)))
(cl-loop for (uri edits) on changes by #'cddr
do (push (list (eglot--uri-to-path uri) edits) prepared))
(if (or confirm
@@ -2541,17 +2540,11 @@ is not active."
(format "[eglot] Server wants to edit:\n %s\n Proceed? "
(mapconcat #'identity (mapcar #'car prepared) "\n
")))
(eglot--error "User cancelled server edit")))
- (while (setq edit (car prepared))
- (pcase-let ((`(,path ,edits ,version) edit))
- (with-current-buffer (find-file-noselect path)
- (eglot--apply-text-edits edits version))
- (pop prepared))
- t)
- (unwind-protect
- (if prepared (eglot--warn "Caution: edits of files %s failed."
- (mapcar #'car prepared))
- (eldoc)
- (eglot--message "Edit successful!"))))))
+ (cl-loop for edit in prepared
+ for (path edits version) = edit
+ do (with-current-buffer (find-file-noselect path)
+ (eglot--apply-text-edits edits version))
+ finally (eldoc) (eglot--message "Edit successful!")))))
(defun eglot-rename (newname)
"Rename the current symbol to NEWNAME."
- [elpa] externals/eglot d00dfe3 08/49: Fix #592: run exit-function only for finished completion, (continued)
- [elpa] externals/eglot d00dfe3 08/49: Fix #592: run exit-function only for finished completion, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 8305eed 18/49: * eglot.el (eglot): Tweak docstring grammar., Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 50b0e84 22/49: Fix #602: fully handle LSP glob syntax, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 550ffc2 34/49: Per #602: tweak glob-parsing grammar, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 133c25e 24/49: Close #613: explicitly require seq.el, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot a43289e 25/49: Fix #616: also override global flymake-diagnostic-functions, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot fc4c324 29/49: Fix #567: update elixir-ls link in README.md, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 7918fac 43/49: Close #637: Add TRAMP support, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 33e83ba 44/49: Fix #638: convert colon to hex in URI, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot bf4a7aa 31/49: Fix #406: mention eglot-stay-out-of in README.md, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 65aadca 46/49: Fix #620: simplify eglot--apply-workspace-edit,
Stefan Monnier <=
- [elpa] externals/eglot 97ed4ca 49/49: Close #643: add new command eglot-shutdown-all, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot f9df418 06/49: Fix #584: Define a face for symbol highlight, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot cb58b72 15/49: Close #603: add fortls for Fotran (f90-mode), Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 147f3b0 16/49: Close #411: offer shortcut commands to commonly invoked code actions, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 99f8d7b 17/49: Per #604: mention common installation pitfalls in README.md, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 2879b83 19/49: * README.md: Mention Google Open Source Peer Bonus, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot d5b840b 20/49: Fix #606, #Fix 608: fix bug in eglot-code-actions, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot eac5264 21/49: Fix #609: flush pending changes to server before code actions request, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot f68f829 26/49: Close #566: prefer typescript-language-server for JS&TS, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot c73f5ed 27/49: Fix #612: remove duplicate entry for "Registration" LSP type, Stefan Monnier, 2021/03/17