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
(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
;; 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
(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)