summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjakub-w <jakub-w@riseup.net>2021-05-07 22:05:42 +0200
committerjakub-w <jakub-w@riseup.net>2021-05-07 22:05:42 +0200
commitcc460a348950c79843b5c9c9b68b86c92077ace4 (patch)
tree6eaa226ad63300a89932c3495d2b14ac5c5586b1 /src
parent700ac985c1c729ba1005a0a076c683e9f781526f (diff)
downloadgeiser-guile-cc460a348950c79843b5c9c9b68b86c92077ace4.tar.gz
geiser-guile-cc460a348950c79843b5c9c9b68b86c92077ace4.tar.bz2
Fix Geiser for Guile 3.0.6
Fixes emacs-geiser/guile#9 In geiser-eval REPL meta-command: All `mod`, `form` and `args` are now syntax objects. The geiser-guile's logic will handle `mod` and `form` as is because they're just passed to guile's eval and compile procedures. `args` are processed by geiser-eval meta-command itself, so it's necessary to convert it back to a datum. We lose some metadata, but all elements in the `args` list are also syntax objects so I don't think it's a big deal. `syntax->datum` was introduced before guile 2 so this change is backward compatible.
Diffstat (limited to 'src')
-rw-r--r--src/geiser/emacs.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/geiser/emacs.scm b/src/geiser/emacs.scm
index 6f2fc29..555add2 100644
--- a/src/geiser/emacs.scm
+++ b/src/geiser/emacs.scm
@@ -35,11 +35,12 @@ Meta-command used by Geiser to emit a new line."
(define-meta-command ((geiser-eval geiser) repl (mod form args) . rest)
"geiser-eval module form args ()
Meta-command used by Geiser to evaluate and compile code."
- (if (null? args)
- (call-with-error-handling
- (lambda () (ge:compile form mod)))
- (let ((proc (eval form this-module)))
- (ge:eval `(,proc ,@args) mod))))
+ (let ((args (syntax->datum args)))
+ (if (null? args)
+ (call-with-error-handling
+ (lambda () (ge:compile form mod)))
+ (let ((proc (eval form this-module)))
+ (ge:eval `(,proc ,@args) mod)))))
(define-meta-command ((geiser-load-file geiser) repl file)
"geiser-load-file file