From: João Távora Date: Tue, 3 Nov 2020 10:26:03 +0000 (+0000) Subject: Don't force eglot-strict-mode completely in eglot--dcase X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~198 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5646b874b2f340cd159429cd141df9f68e0e12be;p=emacs.git 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. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/558 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index bd3bb5337ab..b0bd213b48d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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