[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b3efd5c 6/8: Adjust describe-char-eldoc to new eldoc-documentatio
From: |
Jo�o T�vora |
Subject: |
master b3efd5c 6/8: Adjust describe-char-eldoc to new eldoc-documentation-functions protocol |
Date: |
Wed, 8 Jul 2020 06:26:48 -0400 (EDT) |
branch: master
commit b3efd5c22886743da3ea4b3abea6ca880db3d594
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Adjust describe-char-eldoc to new eldoc-documentation-functions protocol
* lisp/descr-text.el (describe-char-eldoc): Adjust to new
eldoc-documentation-functions protocol.
---
lisp/descr-text.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 22cfccb..776ce76 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -919,7 +919,7 @@ condition, the function may return string longer than
WIDTH, see
(t name)))))))
;;;###autoload
-(defun describe-char-eldoc ()
+(defun describe-char-eldoc (_callback &rest _)
"Return a description of character at point for use by ElDoc mode.
Return nil if character at point is a printable ASCII
@@ -934,7 +934,12 @@ This function can be used as a value of
(let ((ch (following-char)))
(when (and (not (zerop ch)) (or (< ch 32) (> ch 127)))
;; TODO: investigate if the new `eldoc-documentation-functions'
- ;; API could significantly improve this.
+ ;; API could significantly improve this. JT@2020-07-07: Indeed,
+ ;; instead of returning a string tailored here for the echo area
+ ;; exclusively, we could call the (now unused) argument
+ ;; _CALLBACK with hints on how to shorten the string if needed,
+ ;; or with multiple usable strings which Eldoc picks according
+ ;; to its space contraints.
(describe-char-eldoc--format
ch
(unless (eq eldoc-echo-area-use-multiline-p t)
- master updated (df3ece9 -> 384fa10), Jo�o T�vora, 2020/07/08
- master a7a53f0 1/8: Better handle asynchronous Eldoc sources, Jo�o T�vora, 2020/07/08
- master a9bd506 3/8: * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.1.0, Jo�o T�vora, 2020/07/08
- master 1203626 4/8: Make more parts of Emacs use new Eldoc capabilities, Jo�o T�vora, 2020/07/08
- master 22cae4f 2/8: New M-x eldoc for on-demand and interactive documentation requests, Jo�o T�vora, 2020/07/08
- master fbc0bc6 7/8: Change version scheme of two Eldoc obsolete specs, Jo�o T�vora, 2020/07/08
- master 384fa10 8/8: Improve Eldoc docstrings, Jo�o T�vora, 2020/07/08
- master b3efd5c 6/8: Adjust describe-char-eldoc to new eldoc-documentation-functions protocol,
Jo�o T�vora <=
- master bba3bea 5/8: Adjust Eldoc documentation after Eli's review, Jo�o T�vora, 2020/07/08