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

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

[elpa] externals/eglot badcaec 56/62: Don't warn on implementation-speci


From: Stefan Monnier
Subject: [elpa] externals/eglot badcaec 56/62: Don't warn on implementation-specific notifications (#93)
Date: Sat, 29 Sep 2018 17:13:37 -0400 (EDT)

branch: externals/eglot
commit badcaeca88bc0f3908b94be99d82949309c4ebb5
Author: Fangrui Song <address@hidden>
Commit: João Távora <address@hidden>

    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]