[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-chez a5a6176 11/37: fix compile and load for chez
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-chez a5a6176 11/37: fix compile and load for chez |
Date: |
Sun, 1 Aug 2021 18:25:56 -0400 (EDT) |
branch: elpa/geiser-chez
commit a5a617648a445ff323bc7c832786769782d8c45c
Author: Maris Orbidans <maris.orbidans@onthemarket.com>
Commit: Maris Orbidans <maris.orbidans@onthemarket.com>
fix compile and load for chez
---
elisp/geiser-chez.el | 2 +-
scheme/chez/geiser/geiser.ss | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/elisp/geiser-chez.el b/elisp/geiser-chez.el
index 2bd45f1..ff75e5a 100644
--- a/elisp/geiser-chez.el
+++ b/elisp/geiser-chez.el
@@ -104,7 +104,7 @@ This function uses `geiser-chez-init-file' if it exists."
(geiser-eval--send/wait "(begin (import (geiser)) (write `((result )
(output . \"\"))) (newline))")))
(defun geiser-chez--display-error (module key msg)
- (and key (message key) nil))
+ (and key (message msg) nil))
;;; Implementation definition:
diff --git a/scheme/chez/geiser/geiser.ss b/scheme/chez/geiser/geiser.ss
index 8b9aba7..38bc68f 100644
--- a/scheme/chez/geiser/geiser.ss
+++ b/scheme/chez/geiser/geiser.ss
@@ -4,9 +4,26 @@
geiser:module-completions
geiser:autodoc
geiser:no-values
+ geiser:load-file
geiser:newline)
(import (chezscheme))
+ (define (last-index-of str-list char idx last-idx)
+ (if (null? str-list)
+ last-idx
+ (last-index-of (cdr str-list) char (+ 1 idx) (if (char=? char (car
str-list)) idx last-idx))))
+
+ (define (obj-file-name name)
+ (let ((idx (last-index-of (string->list name) #\. 0 -1)))
+ (if (= idx -1)
+ (string-append name ".so")
+ (string-append (substring name 0 idx) ".so"))))
+
+ (define (geiser:load-file filename)
+ (let ((output-filename (obj-file-name filename)))
+ (maybe-compile-file filename output-filename)
+ (load output-filename)))
+
(define string-prefix?
(lambda (x y)
(let ([n (string-length x)])
- [nongnu] branch elpa/geiser-chez created (now 03da1c1), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 2a7a3f6 01/37: Add preliminary support for Chez Scheme, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 1f1ee00 02/37: Clean-up elisp code, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 1bb0a87 06/37: Handle exceptions of ChezScheme and multi-value as well, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 993b630 07/37: Alway pretty-print for results, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez ab13b7f 03/37: Chez: add rudimentary autodoc support, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez e4c15a7 04/37: fix call the chez scheme executable., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 6a83bee 08/37: rewritten geiser:eval to fix the following bug:, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 2fb484b 05/37: Use (car (process-lines ...)) instead of (shell-command ...), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez a5a6176 11/37: fix compile and load for chez,
Philip Kaludercic <=
- [nongnu] elpa/geiser-chez 2d682c0 13/37: fix for geiser-chez-parameters, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 7bc8f62 14/37: Capture stdout in ChezScheme's eval:geiser, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 352515c 16/37: Begin the summary lines of all elisp libraries with three semicolons, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez a0f6fc3 15/37: Add rudimentary Chez support for macro expansion, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 146d4a7 18/37: Fix indentation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 9d66c63 24/37: chez: pretty printing macroexpand results., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 502b3ac 20/37: Use cl-lib instead of cl, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 086dbba 23/37: make chez display output and error messages., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 94296d8 25/37: files moved from original import locations, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chez 111ecdd 26/37: scheme load path adjustments, Philip Kaludercic, 2021/08/01