]> git.eshelyaron.com Git - emacs.git/commit
Simplify eglot-format-buffer
authorJoão Távora <joaotavora@gmail.com>
Wed, 20 Jun 2018 18:29:30 +0000 (19:29 +0100)
committerJoão Távora <joaotavora@gmail.com>
Thu, 21 Jun 2018 12:50:50 +0000 (13:50 +0100)
commit4f346ba25036ca5525ab298aa34a3bcb4f4807f1
tree536724d5868a78aee6f812c633e6463fb29c3b98
parent29b44f7ec1dc6a094e751ec0af6fb950c7858a71
Simplify eglot-format-buffer

Use replace-buffer-contents, as suggested by mkcms
<k.michal@zoho.com>, but do it in eglot--apply-text-edits, where it
benefits all its users.

* README.md (Commands and keybindings): Mention
eglot-format-buffer.

* eglot.el (eglot-format-buffer): Don't try to heuristically
preserve point here.
(eglot--apply-text-edits): Use replace-buffer-contents.

* eglot-tests.el (formatting): adjust test to strictly check for point
position.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/22
lisp/progmodes/eglot.el