From 283cfbcd4d53e22ecacdce33bbfe7a2a3b457a3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 7 May 2018 22:06:49 +0100 Subject: [PATCH] Fix bug in hover support * eldoc.el (eglot-eldoc-function): Use eglot--format-markup. (subr-x): Require it. (eglot--format-markup): Pacify byte-compiler. --- lisp/progmodes/eglot.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 8e927258be7..9d7b16d39fd 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -34,6 +34,7 @@ (require 'warnings) (require 'flymake) (require 'xref) +(require 'subr-x) ;;; User tweakable stuff @@ -763,7 +764,7 @@ Meaning only return locally if successful, otherwise exit non-locally." "Format MARKUP according to LSP's spec." (cond ((stringp markup) (with-temp-buffer - (ignore-errors (funcall 'markdown-mode)) + (ignore-errors (funcall (intern "markdown-mode"))) ;escape bytecompiler (font-lock-ensure) (insert markup) (string-trim (buffer-string)))) @@ -1428,7 +1429,7 @@ DUMMY is ignored" :position (eglot--pos-to-lsp-position)) :success-fn (eglot--lambda (&key contents _range) (eldoc-message - (mapconcat #'eglot--format + (mapconcat #'eglot--format-markup (if (vectorp contents) contents (list contents)) -- 2.39.2