emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 1.2 240f88c 050/101: Don't warn on implementation-specific notifi


From: Christian Johansson
Subject: [elpa] 1.2 240f88c 050/101: Don't warn on implementation-specific notifications (#93)
Date: Thu, 29 Apr 2021 15:08:59 -0400 (EDT)

tag: 1.2
commit 240f88cb4e317cb36bef7c929603c411bb4f104e
Author: Fangrui Song <i@maskray.me>
Commit: João Távora <joaotavora@gmail.com>

    Don't warn on implementation-specific notifications (#93)
    
    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 $.
---
 eglot.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 4ff7337..2ef2259 100644
--- a/eglot.el
+++ b/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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]