[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser d90a08de80: geiser-doc: support for elisp-cooked do
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/geiser d90a08de80: geiser-doc: support for elisp-cooked docstrings |
Date: |
Fri, 28 Oct 2022 20:58:40 -0400 (EDT) |
branch: elpa/geiser
commit d90a08de80ce9d2666fc1fd477a2743c64b45de0
Author: jao <jao@gnu.org>
Commit: jao <jao@gnu.org>
geiser-doc: support for elisp-cooked docstrings
---
elisp/geiser-doc.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index 8c70d5f118..123bc6c563 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -50,6 +50,18 @@ help buffer, after collecting the associated signature and
docstring. You can provide an alternative function for displaying
help (e.g. browse an HTML page) implementing this method.")
+(geiser-impl--define-caller geiser-doc--display-docstring
+ display-docstring (ret)
+ "This method receives the result of calling the geiser scheme
+procedure symbol-documentation and should display it in the
+current buffer. By default, geiser looks for the value of the
+key docstring in the result, assumed to be an alist, and inserts
+it verbatim at point if it's a string. Providing an
+implementation of this method may be useful if displaying the
+info returned by the scheme side (display-docstring) needs more
+elaboration on emacs' side. This method should return a truthy
+value if the default action should be skipped.")
+
;;; Documentation browser history:
@@ -360,7 +372,8 @@ help (e.g. browse an HTML page) implementing this method.")
(geiser-doc--insert-title
(geiser-autodoc--str* (cdr (assoc "signature" docstring))))
(newline)
- (insert (or (cdr (assoc "docstring" docstring)) ""))
+ (or (geiser-doc--display-docstring impl docstring)
+ (insert (or (cdr (assoc "docstring" docstring)) "")))
(geiser-doc--buttonize-modules impl)
(setq geiser-doc--buffer-link
(geiser-doc--history-push (geiser-doc--make-link symbol
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/geiser d90a08de80: geiser-doc: support for elisp-cooked docstrings,
ELPA Syncer <=