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

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

[nongnu] elpa/geiser-gauche 56fcf56 094/119: Reorder the Scheme function


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-gauche 56fcf56 094/119: Reorder the Scheme functions
Date: Sun, 1 Aug 2021 18:28:04 -0400 (EDT)

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

    Reorder the Scheme functions
---
 geiser-gauche.scm | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/geiser-gauche.scm b/geiser-gauche.scm
index 8d65b09..56f73d7 100644
--- a/geiser-gauche.scm
+++ b/geiser-gauche.scm
@@ -51,7 +51,9 @@
   (let ((module-repr (write-to-string module)))
     (string->symbol
      (substring module-repr 9 (- (string-length module-repr) 1)))))
+
 
+;;;; Simple command implementations
 
 (define (geiser:macroexpand form . rest)
   (with-output-to-string
@@ -83,6 +85,11 @@
 
 (define (geiser:no-values . rest)
   (values))
+
+;;; NOTE: We add the load-path at the end. Is this correct?
+(define-macro (geiser:add-to-load-path dir)
+  `(add-load-path ,dir :after))
+
 
 ;;;; Completions
 
@@ -102,7 +109,7 @@
    (map (^x (symbol->string (module-name x)))
        (all-modules))))
 
-;;;; Symbol documentation 
+;;;; Symbol information
 
 ;;; Return the signature of SYMBOL in MODULE if there is one, SYMBOL if the
 ;;; symbol is bound without one, #f otherwise.
@@ -135,6 +142,20 @@
 (define (geiser:symbol-documentation symbol . rest)
   `(("signature" ,(format-symbol-infos (symbol-infos symbol)))))
 
+(define (geiser:symbol-location symbol pref-module)
+  (let* ((module (or pref-module 'user))
+        (obj (global-variable-ref module symbol #f)))
+    (or (and-let* (obj
+                  ((or (is-a? obj <procedure>)
+                       (is-a? obj <generic>)))
+                  (sl (source-location obj))
+                  (file (car sl))
+                  ((string-contains file "/"))
+                  ((not (string-contains file "./")))
+                  (line (cadr sl)))
+         `(("file" . ,file) ("line" . ,line) ("column")))
+       '(("file") ("line") ("column")))))
+
 
 ;;;; Autodoc
 
@@ -206,6 +227,7 @@
                     process-dotted-arg-info)
                 (cdr sig)))
              ("module" ,module))))))
+
 
 ;;;; Module information
 
@@ -243,23 +265,3 @@
                 `(("file" . ,(car paths)) ("line") ("column"))
                 '(("file") ("line") ("column"))))))
 
-
-;;;; Further
-
-(define (geiser:symbol-location symbol pref-module)
-  (let* ((module (or pref-module 'user))
-        (obj (global-variable-ref module symbol #f)))
-    (or (and-let* (obj
-                  ((or (is-a? obj <procedure>)
-                       (is-a? obj <generic>)))
-                  (sl (source-location obj))
-                  (file (car sl))
-                  ((string-contains file "/"))
-                  ((not (string-contains file "./")))
-                  (line (cadr sl)))
-         `(("file" . ,file) ("line" . ,line) ("column")))
-       '(("file") ("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]