From: João Távora Date: Mon, 7 Jan 2019 08:44:37 +0000 (+0000) Subject: Display truncated docstring if too large for echo area X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~341 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=58d4aff894c650ef4b3f601292314af53b961ce3;p=emacs.git Display truncated docstring if too large for echo area * eglot.el (eglot--eldoc-message): Display first line doc. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 9631c192e6c..2ab4bd864a9 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2071,8 +2071,12 @@ Buffer is displayed with `display-buffer', which obeys (if eglot-auto-display-help-buffer (display-buffer (current-buffer)) (unless (get-buffer-window (current-buffer)) - (eglot--message "Help for %s is in %s buffer" eglot--eldoc-hint - (buffer-name eglot--help-buffer)))) + (eglot--message + "%s\n(...truncated. Full help is in `%s')" + (truncate-string-to-width + (replace-regexp-in-string "\\(.*\\)\n.*" "\\1" string) + (frame-width) nil nil "...") + (buffer-name eglot--help-buffer)))) (help-mode) t)))))