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

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

[nongnu] elpa/geiser-gauche a90a648 032/119: Implement module location


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-gauche a90a648 032/119: Implement module location
Date: Sun, 1 Aug 2021 18:27:52 -0400 (EDT)

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

    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))
+



reply via email to

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