[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot ec02ffa 14/62: Work around Emacs bugs 32237, 3227
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot ec02ffa 14/62: Work around Emacs bugs 32237, 32278 (#53) |
Date: |
Sat, 29 Sep 2018 17:13:29 -0400 (EDT) |
branch: externals/eglot
commit ec02ffab1f2c2a69062f7c7e7a921cda2575f0c4
Author: mkcms <address@hidden>
Commit: João Távora <address@hidden>
Work around Emacs bugs 32237, 32278 (#53)
See:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32237
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32278
* eglot.el (eglot--apply-text-edits): Inhibit modification hooks and
call them manually for the changed region.
---
eglot.el | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 695db49..1ca7b6d 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1438,7 +1438,23 @@ If SKIP-SIGNATURE, don't try to send
textDocument/signatureHelp."
(save-excursion
(save-restriction
(narrow-to-region beg end)
- (replace-buffer-contents temp)))
+
+ ;; On emacs versions < 26.2,
+ ;; `replace-buffer-contents' is buggy - it calls
+ ;; change functions with invalid arguments - so we
+ ;; manually call the change functions here.
+ ;;
+ ;; See emacs bugs #32237, #32278:
+ ;;
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32237
+ ;;
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32278
+ (let ((inhibit-modification-hooks t)
+ (length (- end beg)))
+ (run-hook-with-args 'before-change-functions
+ beg end)
+ (replace-buffer-contents temp)
+ (run-hook-with-args 'after-change-functions
+ beg (+ beg (length newText))
+ length))))
(progress-reporter-update reporter (cl-incf done)))))))
(mapcar (jsonrpc-lambda (&key range newText)
(cons newText (eglot--range-region range 'markers)))
- [elpa] externals/eglot 0c85b8f 05/62: Tests only kill server-related buffers when successfull, (continued)
- [elpa] externals/eglot 0c85b8f 05/62: Tests only kill server-related buffers when successfull, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 400623f 03/62: Test with Emacs 26.1, not the 26 pre-release, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 5d88eed 06/62: Close #39: Handle experimental/unknown server methods gracefully, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 3ac4b64 04/62: * Makefile (JSONRPC): Call package-refresh-contents, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 8d61eca 09/62: Close #44: Don't turn on flymake-mode any more than is needed, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot a57d5d8 07/62: Close #29: Implement workspace/didChangeConfiguration (#40), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 616ad53 13/62: Close #48: be less verbose when using eglot-ensure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot eeb34c6 21/62: Default eglot-handle-notifictiona|request must &allow-other-keys, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 04f7db7 10/62: Per #48: Fix messages of eglot-ensure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 5808c0d 11/62: Add entry for haskell-ide-engine in eglot-server-programs (#49), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot ec02ffa 14/62: Work around Emacs bugs 32237, 32278 (#53),
Stefan Monnier <=
- [elpa] externals/eglot e476411 19/62: Close #58: Erase company-doc buffer in between doc requests, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot dfaa389 12/62: * README.md (Installation and usage): Add haskell-ide-engine, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot a6cad6b 15/62: Fix typo in willSaveWaitUntil RPC request (#51), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 2728e12 22/62: Per #59: eglot-workspace-configuration's keys needn't be keywords, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot fd7e587 27/62: Require jsonrpc.el 1.0.2 (GNU ELPA didn't build 1.0.1), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 99fd6a4 30/62: * eglot.el (eglot-cquery): Capitalize docstring., Stefan Monnier, 2018/09/29
- [elpa] externals/eglot fdd021c 26/62: Close #61: Snappier completions that don't hinder typing, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 22b0c89 41/62: Add kotlin-language-server (#70), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 3ffea45 44/62: Close #50: Support snippet completions, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot e711bdb 47/62: Add go-langserver (#74), Stefan Monnier, 2018/09/29