From: Michal Krzywkowski Date: Fri, 17 Aug 2018 23:56:01 +0000 (+0200) Subject: Fix textdocument/hover responses where markedstring is a plist () X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~442 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7704fbac0be3bc40ec99467cbe5ed04f80698335;p=emacs.git Fix textdocument/hover responses where markedstring is a plist () * eglot.el (eglot--hover-info): Forward all non-vector content to eglot--format-markup. GitHub-reference: https://github.com/joaotavora/eglot/issues/72 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 13c72abdc4e..6f3676117a7 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1446,8 +1446,7 @@ is not active." (let ((heading (and range (pcase-let ((`(,beg . ,end) (eglot--range-region range))) (concat (buffer-substring beg end) ": ")))) (body (mapconcat #'eglot--format-markup - (append (cond ((vectorp contents) contents) - ((stringp contents) (list contents)))) "\n"))) + (if (vectorp contents) contents (list contents)) "\n"))) (when (or heading (cl-plusp (length body))) (concat heading body)))) (defun eglot--sig-info (sigs active-sig active-param)