branch: elpa/geiser-gauche
commit a90a648b0c79b53e6647bdc2974c9ef16b82fd36
Author: András Simonyi <[email protected]>
Commit: András Simonyi <[email protected]>
Implement module location
---
geiser.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/geiser.scm b/geiser.scm
index 3108de2..153bf07 100644
--- a/geiser.scm
+++ b/geiser.scm
@@ -12,6 +12,7 @@
geiser:module-completions
geiser:add-to-load-path
geiser:symbol-documentation
+ geiser:module-location
;; Missing functions:
;; geiser-start-server
;; geiser-object-signature
@@ -19,8 +20,6 @@
;; geiser-find-file
;; geiser-compile-file
;; geiser-compile
- ;; geiser-module-path
- ;; geiser-module-location
))
(select-module geiser)
@@ -196,6 +195,15 @@
;; Further
+(define (geiser:module-location m)
+ (and (find-module m)
+ (let1 paths (map cdr (library-fold m acons '()))
+ (if (pair? paths)
+ `(("file" . ,(car paths)) ("line") ("column"))
+ ()))))
+
+
;; 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))
+