]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug in hover support
authorJoão Távora <joaotavora@gmail.com>
Mon, 7 May 2018 21:06:49 +0000 (22:06 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 7 May 2018 21:06:49 +0000 (22:06 +0100)
* eldoc.el (eglot-eldoc-function): Use eglot--format-markup.
(subr-x): Require it.
(eglot--format-markup): Pacify byte-compiler.

lisp/progmodes/eglot.el

index 8e927258be7b03a84cb6a2e4114388a45d93962f..9d7b16d39fd8ecc79cfa145cd0df0b3b608295b8 100644 (file)
@@ -34,6 +34,7 @@
 (require 'warnings)
 (require 'flymake)
 (require 'xref)
+(require 'subr-x)
 
 \f
 ;;; 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))