Eglot: unbreak for Emacs 26

Emacs 26 doesn't have newer progress-reporter-update.
I think I'll start using compat.el soon.

* lisp/progmodes/eglot.el (eglot--apply-text-edits): Unbreak for
Emacs 26 which doesn't have newer progress-reporter-update.
This commit is contained in:
João Távora 2023-04-29 20:46:12 +01:00
parent e03cfec0a4
commit c604cb6a8a

View file

@ -2237,7 +2237,7 @@ COMMAND is a symbol naming the command."
((eq (car pr) 'eglot--mode-line-reporter)
(setcdr (cddr pr) (list msg pcnt))
(force-mode-line-update t))
(pr (progress-reporter-update pr pcnt msg)))))
(pr (eglot--reporter-update pr pcnt msg)))))
(eglot--dbind ((WorkDoneProgress) kind title percentage message) value
(pcase kind
("begin"
@ -3341,7 +3341,7 @@ Returns a list as described in docstring of `imenu--index-alist'."
(save-restriction
(narrow-to-region beg end)
(replace-buffer-contents temp)))
(progress-reporter-update reporter (cl-incf done)))))))
(eglot--reporter-update reporter (cl-incf done)))))))
(mapcar (eglot--lambda ((TextEdit) range newText)
(cons newText (eglot--range-region range 'markers)))
(reverse edits)))