mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-28 07:50:48 -08:00
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.
This commit is contained in:
parent
7c7e12405b
commit
43db0e2784
1 changed files with 1 additions and 19 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue