From: João Távora Date: Sat, 5 Oct 2019 10:46:08 +0000 (+0100) Subject: Revert "treat null/nil server capabilities as false" X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~312 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe37d7e3ce796a2bee21af6a0b34de59aef1daca;p=emacs.git Revert "treat null/nil server capabilities as false" This reverts commit 645bcfc6e57181c39dae1f238758e76c1759a765. A capability of "null" is downright invalid, and must NOT be mistaken for a value of "{}" (which indicates the presence of the capability) or "False" (which indicates its asence). See https://github.com/microsoft/language-server-protocol/issues/830#issuecomment-537849292 for a clarification from the LSP maintainer. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index ef7f8f0a3ec..d1a1a3d0b20 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1113,9 +1113,6 @@ under cursor." for probe = (plist-member caps feat) if (not probe) do (cl-return nil) if (eq (cadr probe) :json-false) do (cl-return nil) - ;; If the server specifies null as the value of the capability, it - ;; makes sense to treat it like false. - if (null (cadr probe)) do (cl-return nil) if (not (listp (cadr probe))) do (cl-return (if more nil (cadr probe))) finally (cl-return (or (cadr probe) t)))))