[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-chibi 88a5b09 08/38: Add scheme subroutine to find
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-chibi 88a5b09 08/38: Add scheme subroutine to find files implementing modules to chibi. |
Date: |
Sun, 1 Aug 2021 18:26:16 -0400 (EDT) |
branch: elpa/geiser-chibi
commit 88a5b095ff14054f1c8f9e45430307c88580dcfc
Author: Lockywolf <lockywolf@gmail.com>
Commit: Lockywolf <lockywolf@gmail.com>
Add scheme subroutine to find files implementing modules to chibi.
Add a helper function make-location to chibi interface.
---
scheme/chibi/geiser/geiser.scm | 27 +++++++++++++++++++++++++++
scheme/chibi/geiser/geiser.sld | 3 +++
2 files changed, 30 insertions(+)
diff --git a/scheme/chibi/geiser/geiser.scm b/scheme/chibi/geiser/geiser.scm
index 96399c3..6ba3edd 100644
--- a/scheme/chibi/geiser/geiser.scm
+++ b/scheme/chibi/geiser/geiser.scm
@@ -1,3 +1,4 @@
+; -*- geiser-scheme-implementation:chibi; -*-
(define (all-environment-exports environment prefix)
(if environment
(append (filter (lambda (identifier)
@@ -92,3 +93,29 @@
(define (geiser:newline)
#f)
+;(define (geiser:symbol-location)
+ ; '("geiser-chibi-error" "Not
implemented"))
+
+;;> A chibi implementation of the standard geiser's location-making
+;;> subrouting. \var{file} is a string representing file name with path,
+;;> \var{line} is the line number starting from 0 (scheme way).
+
+(define (make-location file line)
+ (list (cons "file" (if (string? file) file '()))
+ (cons "line" (if (number? line) (+ 1 line) '()))))
+
+;;> A function to find the file where the symbol
+;;> \var{symbol-representing-module} is defined.
+
+(define (geiser:module-location symbol-representing-module)
+ (make-location
+ (find-module-file
+ (module-name->file
+ (module-name
+ (find-module symbol-representing-module)
+ )
+ )
+ )
+ 0
+ )
+)
diff --git a/scheme/chibi/geiser/geiser.sld b/scheme/chibi/geiser/geiser.sld
index a60b7de..30c0986 100644
--- a/scheme/chibi/geiser/geiser.sld
+++ b/scheme/chibi/geiser/geiser.sld
@@ -1,9 +1,12 @@
+; -*- geiser-scheme-implementation:chibi; -*-
(define-library (geiser)
(export geiser:completions
geiser:eval
geiser:autodoc
geiser:module-completions
geiser:no-values
+; geiser:symbol-location
+ geiser:module-location
geiser:newline)
(import (scheme small) (chibi modules) (chibi) (meta) (chibi ast) (chibi
string) (srfi 1) (srfi 95) (chibi show))
(include "geiser.scm"))
- [nongnu] branch elpa/geiser-chibi created (now 6f59291), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 243a860 01/38: Add preliminary support for Chibi Scheme, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi b943a99 02/38: Use faster module list, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 2ca82e6 04/38: geiser-chibi: Implement autodoc for procedures in known modules, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 6d73a7e 07/38: Catch eval and send back eval exception information, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 8588086 11/38: Improve geiser:eval to return output Add docstring to geiser:output., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi a672720 06/38: Add string combinators module, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 88a5b09 08/38: Add scheme subroutine to find files implementing modules to chibi.,
Philip Kaludercic <=
- [nongnu] elpa/geiser-chibi b260b6d 09/38: Remove debug printing. Align par-style with geiser., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 397ba42 13/38: Temporarily fix the symbol-module by appending (current-directory)., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi f52a4ec 16/38: Fix indenting and parenthesis positioning., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 2a4fb4f 10/38: Add a TODO tag about symbol-location to geiser.sld, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi c860e3a 12/38: Add error reporting about missing symbols to geiser-edit.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 0272694 05/38: Use (car (process-lines ...)) instead of (shell-command ...), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 41929c9 03/38: Clean-up elisp code, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 5b016dd 18/38: geiser-chibi: allow passing custom argument list to chibi scheme process, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 2e725bb 23/38: Add printing a stack trace to the user code exceptions., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 420909d 28/38: Use cl-lib instead of cl, Philip Kaludercic, 2021/08/01