From: Fangrui Song Date: Fri, 7 Sep 2018 09:00:18 +0000 (-0700) Subject: Don't warn on implementation-specific notifications () X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~433 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=acda0eda5a8599d8a843eb3c9dc214d80593853f;p=emacs.git Don't warn on implementation-specific notifications () Only warn when method name doesn't start with '$'. Per the spec: "if a server or client receives notifications or requests starting with ‘$/’ it is free to ignore them if they are unknown." * eglot.el (eglot-handle-notification t t): Check method name for $. GitHub-reference: https://github.com/joaotavora/eglot/issues/93 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4ff7337d11e..2ef22593e06 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -987,7 +987,8 @@ Uses THING, FACE, DEFS and PREPEND." (cl-defmethod eglot-handle-notification (_server method &key &allow-other-keys) "Handle unknown notification" - (eglot--warn "Server sent unknown notification method `%s'" method)) + (unless (string-prefix-p "$" method) + (eglot--warn "Server sent unknown notification method `%s'" method))) (cl-defmethod eglot-handle-request (_server method &key &allow-other-keys)