emacs-devel
[Top][All Lists]
Advanced

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

eglot.el; delete emacs 26.2 workaround?


From: Stephen Leake
Subject: eglot.el; delete emacs 26.2 workaround?
Date: Tue, 08 Nov 2022 09:58:17 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

One of my ada-mode tests for eglot ran into a problem with
flymake-after-change-function, called from eglot--apply-text-edits. The
code there says it's a workaround for emacs < 26.2, but eglot.el
currently requires emacs 26.3. So I deleted the workaround (patch
attached), and that fixed the ada-mode test.

Ok to commit?

-- 
-- Stephe
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index ce989b5611..4cd067983f 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -3095,25 +3095,8 @@ eglot--apply-text-edits
                       (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]