branch: externals/elpa commit 21726416e6e580b20dfa90833c6dab2a8a15ea48 Author: João Távora <joaotav...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
Fix #558: Don't force eglot-strict-mode completely in eglot--dcase Doing so was by design, since there's much ambiguity between the CodeAction and Command objects. But 'disallow-non-standard-keys is not necessary to disambiguate, and proved harmful in this bug. * eglot.el (eglot--dcase): Don't disallow (eglot--check-dspec): Fix docstring. --- eglot.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eglot.el b/eglot.el index bd3bb53..b0bd213 100644 --- a/eglot.el +++ b/eglot.el @@ -373,7 +373,7 @@ on unknown notifications and errors on unknown requests. :optional-keys (mapcar #'car optional)))) (defun eglot--check-dspec (interface-name dspec) - "Check if variables in DSPEC " + "Check destructuring spec DSPEC against INTERFACE-NAME." (cl-destructuring-bind (&key required-keys optional-keys &allow-other-keys) (eglot--interface interface-name) (cond ((or required-keys optional-keys) @@ -457,10 +457,14 @@ treated as in `eglot-dbind'." (cond (interface-name (eglot--check-dspec interface-name vars) ;; In this mode, in runtime, we assume - ;; `eglot-strict-mode' is fully on, otherwise we + ;; `eglot-strict-mode' is partially on, otherwise we ;; can't disambiguate between certain types. `(ignore-errors - (eglot--check-object ',interface-name ,obj-once))) + (eglot--check-object + ',interface-name ,obj-once + t + (memq 'disallow-non-standard-keys eglot-strict-mode) + t))) (t ;; In this interface-less mode we don't check ;; `eglot-strict-mode' at all: just check that the object