From f71716e91427d893773ca68d5d3dec417a963571 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 21 Oct 2019 13:08:45 +0100 Subject: [PATCH] (again): fix issue with replace-buffer-contents Manually calling the before/after change hooks for Emacs 26.1's buggy replace-buffer-contents must be done with absolute positions, not markers. * eglot.el (eglot--apply-text-edits): Call change hooks with buffer positions, not markers. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/259 --- lisp/progmodes/eglot.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e78d2c45882..e1c7b48c8d6 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2307,7 +2307,9 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp." ;; 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))) + (length (- end beg)) + (beg (marker-position beg)) + (end (marker-position end))) (run-hook-with-args 'before-change-functions beg end) (replace-buffer-contents temp) -- 2.39.2