emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-chicken 5f2c1bb446: [chicken 5] Add support for `ch


From: ELPA Syncer
Subject: [nongnu] elpa/geiser-chicken 5f2c1bb446: [chicken 5] Add support for `chicken-doc`
Date: Wed, 4 Dec 2024 10:00:29 -0500 (EST)

branch: elpa/geiser-chicken
commit 5f2c1bb446af6ae4aec9c8d74d4ecb34031706fd
Author: Lou Woell <lou.woell@posteo.de>
Commit: Lou Woell <lou.woell@posteo.de>

    [chicken 5] Add support for `chicken-doc`
    
    Add support for showing chicken doc entries via 
`geiser-symbol-documentation`.
    
    This is very barebones and should probably be extended later. Currently
    does not filter documentation down to only loaded symbols but shows docs
    for all nodes `(match-nodes symbol)` matches.
---
 src/geiser/chicken5.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/geiser/chicken5.scm b/src/geiser/chicken5.scm
index 31ce3cc509..c670c1a93b 100644
--- a/src/geiser/chicken5.scm
+++ b/src/geiser/chicken5.scm
@@ -35,6 +35,7 @@
     apropos
     srfi-1
     srfi-18
+    chicken-doc
     (chicken base)
     (chicken tcp)
     (chicken file)
@@ -317,10 +318,19 @@
   (define (geiser-symbol-location symbol . rest)
     '(("file") ("line")))
 
+  (define (geiser-symbol-chicken-doc symbol)
+    (with-output-to-string
+      (lambda ()
+        (map (lambda (x)
+               (describe-signatures (list x))
+               (describe x))
+             (match-nodes symbol)))))
+
   (define (geiser-symbol-documentation symbol . rest)
-    (let* ((sig (find-signatures symbol)))
+    (let* ((sig (find-signatures symbol))
+           (docstring (geiser-symbol-chicken-doc symbol)))
       `(("signature" ,@(car sig))
-        ("docstring" . ""))))
+        ("docstring" . ,docstring))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; File and Buffer Operations



reply via email to

[Prev in Thread] Current Thread [Next in Thread]