]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use three-argument plist-get
authorJoão Távora <joaotavora@gmail.com>
Mon, 19 Sep 2022 15:04:31 +0000 (16:04 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 19 Sep 2022 15:04:31 +0000 (16:04 +0100)
* eglot.el (eglot-handle-request): Don't use three-argument
plist-get.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/1024

lisp/progmodes/eglot.el

index 7c1e849389d4fcc5f1cc5792048d97508585630a..0867e43e07f72c433fad7ccc325ec3cea882ac44 100644 (file)
@@ -2285,13 +2285,15 @@ When called interactively, use the currently active server"
                          (project-root (eglot--project server)))))
                 (setq-local major-mode (eglot--major-mode server))
                 (hack-dir-local-variables-non-file-buffer)
-                (plist-get (eglot--workspace-configuration-plist server) section
-                           (lambda (section wsection)
-                             (string=
-                              (if (keywordp wsection)
-                                  (substring (symbol-name wsection) 1)
-                                wsection)
-                              section))))))
+                (cl-loop for (wsection o)
+                         on (eglot--workspace-configuration-plist server)
+                         by #'cddr
+                         when (string=
+                               (if (keywordp wsection)
+                                   (substring (symbol-name wsection) 1)
+                                 wsection)
+                               section)
+                         return o))))
           items)))
 
 (defun eglot--signal-textDocument/didChange ()