From c604cb6a8a5ac4ca1cfb5e839ca6d7ad1d77b5b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= <joaotavora@gmail.com> Date: Sat, 29 Apr 2023 20:46:12 +0100 Subject: [PATCH] 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. --- lisp/progmodes/eglot.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 6ae27a13845..53bc25a1b7e 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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))) -- 2.39.5