emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 43db0e2784: Delete emacs < 26.2 workaround in eglot--apply-text-e


From: Stephen Leake
Subject: master 43db0e2784: Delete emacs < 26.2 workaround in eglot--apply-text-edits
Date: Wed, 9 Nov 2022 09:01:07 -0500 (EST)

branch: master
commit 43db0e2784bfafdb8b08a2f5f075e2d432df132f
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>

    Delete emacs < 26.2 workaround in eglot--apply-text-edits
    
    * lisp/progmodes/eglot.el (eglot--apply-text-edits): Delete emacs <
    26.2 workaround; fixes bug in ada-mode test.
---
 lisp/progmodes/eglot.el | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index ce989b5611..2eaa396386 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3095,25 +3095,7 @@ Returns a list as described in docstring of 
`imenu--index-alist'."
                       (save-excursion
                         (save-restriction
                           (narrow-to-region beg end)
-
-                          ;; 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))
-                                (beg (marker-position beg))
-                                (end (marker-position end)))
-                            (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))))
+                          (replace-buffer-contents temp)))
                       (progress-reporter-update reporter (cl-incf done)))))))
             (mapcar (eglot--lambda ((TextEdit) range newText)
                       (cons newText (eglot--range-region range 'markers)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]