[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/eglot2emacs bc05805887 036/120: ; unbreak tests on emacs 26
From: |
João Távora |
Subject: |
feature/eglot2emacs bc05805887 036/120: ; unbreak tests on emacs 26 |
Date: |
Thu, 20 Oct 2022 07:16:48 -0400 (EDT) |
branch: feature/eglot2emacs
commit bc058058872a13e6ee3d9a04c6d37f2bba5a4852
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
; unbreak tests on emacs 26
* eglot.el (eglot--plist-keys): Define in Emacs 26, no longer
obsolete in Emacs 27 or later.
(eglot--check-object): Go back to eglot--plist-keys.
---
lisp/progmodes/eglot.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 9c9f055cfa..14a4d1cd43 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -451,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
- (map-keys object)))))
+ (eglot--plist-keys object)))))
(eglot--error "A `%s' must have %s" interface-name missing))
(when-let ((excess (and disallow-non-standard
(cl-set-difference
- (map-keys object)
+ (eglot--plist-keys object)
(append required-keys optional-keys)))))
(eglot--error "A `%s' mustn't have %s" interface-name excess))
(when check-types
@@ -580,7 +580,7 @@ treated as in `eglot-dbind'."
;; has all the keys the user wants to destructure.
`(null (cl-set-difference
',vars-as-keywords
- (map-keys ,obj-once)))))
+ (eglot--plist-keys ,obj-once)))))
collect `(,condition
(cl-destructuring-bind (&key ,@vars &allow-other-keys)
,obj-once
@@ -3103,7 +3103,12 @@ 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")
+
+(if (< emacs-major-version 27)
+ (defun eglot--plist-keys (plist)
+ (cl-loop for (k _v) on plist by #'cddr collect k))
+ ;; Make into an obsolete alias once we drop support for Emacs 26.
+ (defalias 'eglot--plist-keys #'map-keys))
(provide 'eglot)
- feature/eglot2emacs 6ee995fe6b 094/120: Add marksman server for markdown, (continued)
- feature/eglot2emacs 6ee995fe6b 094/120: Add marksman server for markdown, João Távora, 2022/10/20
- feature/eglot2emacs 0e8a8697ba 092/120: Merge commit '7738854e09' to fix fallout of force-push in gnu elpa, João Távora, 2022/10/20
- feature/eglot2emacs 51ae66b50c 099/120: Add eglot-show-configuration to debug workspace configurations, João Távora, 2022/10/20
- feature/eglot2emacs 14586fedcf 103/120: Don't exceed max-specdl-size in big go projects, João Távora, 2022/10/20
- feature/eglot2emacs a8b3b6a526 014/120: Add vim-language-server for vimrc-mode, João Távora, 2022/10/20
- feature/eglot2emacs b1c7aa1d17 003/120: Add yaml-language-server for yaml-mode, João Távora, 2022/10/20
- feature/eglot2emacs 51fc8fc3d2 002/120: Use `locate-user-emacs-file` instead of `concat`, João Távora, 2022/10/20
- feature/eglot2emacs 06f1cd6365 008/120: Add lua-lsp support for lua-mode, João Távora, 2022/10/20
- feature/eglot2emacs 7c712abf8f 009/120: Minor checkdoc fixes, João Távora, 2022/10/20
- feature/eglot2emacs 8a9959e054 039/120: Add clojure-lsp support for clojure, João Távora, 2022/10/20
- feature/eglot2emacs bc05805887 036/120: ; unbreak tests on emacs 26,
João Távora <=
- feature/eglot2emacs 8b31247f1c 044/120: Properly check the completionitem.deprecated property, João Távora, 2022/10/20
- feature/eglot2emacs 5b88ec259c 026/120: Change from symbol-at-point to thing-at-point, João Távora, 2022/10/20
- feature/eglot2emacs 3aeebe8186 037/120: Change rust language server to rust-analyzer, João Távora, 2022/10/20
- feature/eglot2emacs ed4fd33223 043/120: * eglot.el (eglot-handle-notification): silence byte-compiler., João Távora, 2022/10/20
- feature/eglot2emacs 5b62d0071e 040/120: Enable lsp project-wide diagnostics via flymake, João Távora, 2022/10/20
- feature/eglot2emacs 5d2f6bc667 055/120: Map more emacs variables to lsp formattingoptions fields, João Távora, 2022/10/20
- feature/eglot2emacs c06860b0f4 022/120: Bump eglot version to 1.8, João Távora, 2022/10/20
- feature/eglot2emacs 97ded82277 033/120: ; * eglot.el: move obsolete definition to new section., João Távora, 2022/10/20
- feature/eglot2emacs a905bad633 024/120: * eglot.el: improve commentary section., João Távora, 2022/10/20
- feature/eglot2emacs f550342059 069/120: Add out-of-box support for purescript lsp server, João Távora, 2022/10/20