emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/eglot2emacs 68b9c03b44 106/120: Don't use three-argument plist-g


From: João Távora
Subject: feature/eglot2emacs 68b9c03b44 106/120: Don't use three-argument plist-get
Date: Thu, 20 Oct 2022 07:17:07 -0400 (EDT)

branch: feature/eglot2emacs
commit 68b9c03b44a056e7a1454879b7f1b9cf050f7ddb
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Don't use three-argument plist-get
    
    * 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 | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 7c1e849389..0867e43e07 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]