emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/eglot cae551545a 2/3: Obsolete eglot--plist-keys in fav


From: ELPA Syncer
Subject: [elpa] externals/eglot cae551545a 2/3: Obsolete eglot--plist-keys in favor of map-keys
Date: Sun, 16 Jan 2022 07:57:28 -0500 (EST)

branch: externals/eglot
commit cae551545a023e0d5cd24211e65daab2d2c13bdb
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Obsolete eglot--plist-keys in favor of map-keys
    
    * eglot.el (eglot--plist-keys): Make into obsolete function alias
    for map-keys.
---
 eglot.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/eglot.el b/eglot.el
index f3710fd3c9..e7aa4ee185 100644
--- a/eglot.el
+++ b/eglot.el
@@ -439,9 +439,6 @@ destructuring spec doesn't use all optional fields.
 If the symbol `disallow-unknown-methods' is present, Eglot warns
 on unknown notifications and errors on unknown requests."))
 
-(defun eglot--plist-keys (plist)
-  (cl-loop for (k _v) on plist by #'cddr collect k))
-
 (cl-defun eglot--check-object (interface-name
                                object
                                &optional
@@ -454,11 +451,11 @@ on unknown notifications and errors on unknown 
requests."))
       (eglot--interface interface-name)
     (when-let ((missing (and enforce-required
                              (cl-set-difference required-keys
-                                                (eglot--plist-keys object)))))
+                                                (map-keys object)))))
       (eglot--error "A `%s' must have %s" interface-name missing))
     (when-let ((excess (and disallow-non-standard
                             (cl-set-difference
-                             (eglot--plist-keys object)
+                             (map-keys object)
                              (append required-keys optional-keys)))))
       (eglot--error "A `%s' mustn't have %s" interface-name excess))
     (when check-types
@@ -583,7 +580,7 @@ treated as in `eglot-dbind'."
                   ;; has all the keys the user wants to destructure.
                   `(null (cl-set-difference
                           ',vars-as-keywords
-                          (eglot--plist-keys ,obj-once)))))
+                          (map-keys ,obj-once)))))
            collect `(,condition
                      (cl-destructuring-bind (&key ,@vars &allow-other-keys)
                          ,obj-once
@@ -3106,6 +3103,7 @@ If INTERACTIVE, prompt user for details."
 
 (make-obsolete-variable 'eglot--managed-mode-hook
                         'eglot-managed-mode-hook "1.6")
+(define-obsolete-function-alias 'eglot--plist-keys #'map-keys "1.9")
 
 (provide 'eglot)
 



reply via email to

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