From ddb443e5ea5c61bee5ae6932495328fc208f08b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 8 Mar 2025 05:15:57 +0000 Subject: [PATCH] Eglot: unbreak from Emacs 26.3 (two-arg setq-local) * lisp/progmodes/eglot.el (eglot--hierarchy-1): Use two-arg setq-local (cherry picked from commit d81cdf9fd23910d38f13a65ccb4909af2c2bdfd9) --- lisp/progmodes/eglot.el | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 81b3ef7832d..f5674a90067 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -4655,20 +4655,19 @@ If NOERROR, return predicate, else erroring function." (eglot--error "No hierarchy information here")) (with-current-buffer (get-buffer-create name) (eglot-hierarchy-mode) - (setq-local - eglot--hierarchy-roots roots - eglot--hierarchy-specs specs - eglot--cached-server server - eglot--hierarchy-source-major-mode mode - buffer-read-only t - revert-buffer-function - (lambda (&rest _ignore) - ;; flush cache, would defeat purpose of a revert - (mapc (lambda (r) - (eglot--dbind ((HierarchyItem) name) r - (set-text-properties 0 1 nil name))) - eglot--hierarchy-roots) - (eglot--hierarchy-2))) + (setq-local eglot--hierarchy-roots roots) + (setq-local eglot--hierarchy-specs specs) + (setq-local eglot--cached-server server) + (setq-local eglot--hierarchy-source-major-mode mode) + (setq-local buffer-read-only t) + (setq-local revert-buffer-function + (lambda (&rest _ignore) + ;; flush cache, would defeat purpose of a revert + (mapc (lambda (r) + (eglot--dbind ((HierarchyItem) name) r + (set-text-properties 0 1 nil name))) + eglot--hierarchy-roots) + (eglot--hierarchy-2))) (eglot--hierarchy-2)))) (defun eglot--hierarchy-2 () -- 2.39.5