From: Stephen Leake Date: Sat, 13 Nov 2021 10:39:59 +0000 (-0800) Subject: Fix issues; severity not set in textdocument/publishdiagnostics X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~120^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=19d8085b762161ef4e54997acf43b87a535accb4;p=emacs.git Fix issues; severity not set in textdocument/publishdiagnostics * eglot.el (eglot-handle-notification): Handle severity not set. GitHub-reference: https://github.com/joaotavora/eglot/issues/755 GitHub-reference: https://github.com/joaotavora/eglot/issues/401 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index bf9cf25c33b..d8890209129 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1,6 +1,6 @@ ;;; eglot.el --- Client for Language Server Protocol (LSP) servers -*- lexical-binding: t; -*- -;; Copyright (C) 2018-2020 Free Software Foundation, Inc. +;; Copyright (C) 2018-2021 Free Software Foundation, Inc. ;; Version: 1.7 ;; Author: João Távora @@ -1603,7 +1603,7 @@ Use `eglot-managed-p' to determine if current buffer is managed.") :key #'eglot--major-mode) (and eglot-extend-to-xref buffer-file-name - (gethash (expand-file-name buffer-file-name) + (gethash (expand-file-name buffer-file-name) eglot--servers-by-xrefed-file))))) (defun eglot--current-server-or-lose () @@ -1808,7 +1808,8 @@ COMMAND is a symbol naming the command." (point-at-eol (1+ (plist-get (plist-get range :end) :line))))))) (eglot--make-diag (current-buffer) beg end - (cond ((<= sev 1) 'eglot-error) + (cond ((null sev) 'eglot-error) + ((<= sev 1) 'eglot-error) ((= sev 2) 'eglot-warning) (t 'eglot-note)) message `((eglot-lsp-diag . ,diag-spec)))))