]> git.eshelyaron.com Git - emacs.git/commitdiff
Eglot: unbreak for Emacs 26
authorJoão Távora <joaotavora@gmail.com>
Sat, 29 Apr 2023 19:46:12 +0000 (20:46 +0100)
committerJoão Távora <joaotavora@gmail.com>
Sat, 29 Apr 2023 19:46:12 +0000 (20:46 +0100)
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.

lisp/progmodes/eglot.el

index 6ae27a138459ddff9f146c95157cc9d546e846b9..53bc25a1b7ef1c6c58a0826a679e3e1752517c17 100644 (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)))