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

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

[nongnu] elpa/geiser-gauche c96701c 047/119: Continue work on module doc


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-gauche c96701c 047/119: Continue work on module docs
Date: Sun, 1 Aug 2021 18:27:55 -0400 (EDT)

branch: elpa/geiser-gauche
commit c96701c11fe07bd8e8f2a4b65b171a0ffc156570
Author: András Simonyi <andras.simonyi@gmail.com>
Commit: András Simonyi <andras.simonyi@gmail.com>

    Continue work on module docs
---
 geiser.scm | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/geiser.scm b/geiser.scm
index 4f69b8e..9f1517b 100644
--- a/geiser.scm
+++ b/geiser.scm
@@ -206,9 +206,23 @@
 ;; Module documentation
 
 (define (geiser:module-exports mod-name . rest)
-  (let1 symbols (module-exports (find-module mod-name))
-       (list (cons "procs"
-                   (map list symbols)))))
+  (let* ((module (find-module mod-name))
+        (symbols (module-exports module))
+        (syms-objs
+         (map (^x (cons x (global-variable-ref module x)))
+              symbols))
+        (procs ()) (macros ()) (vars ()))
+    (dolist (sym-obj syms-objs)
+           (let ((obj (cdr sym-obj))
+                 (sym (car sym-obj)))
+                 (cond
+                  ((is-a? obj <procedure>) (push! procs sym))
+                  ((or (is-a? obj <macro>)
+                       (is-a? obj <syntax>)) (push! macros sym))
+                  (else (push! vars sym)))))
+    (list (cons "procs" (map list procs))
+         (cons "syntax" (map list macros))
+         (cons "vars" (map list vars)))))
 
 
 ;; Further
@@ -224,3 +238,5 @@
 ;; TODO We add the load-path at the end. Is this correct?
 (define-macro (geiser:add-to-load-path dir)
   `(add-load-path ,dir :after))
+
+



reply via email to

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