summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-racket.el19
-rw-r--r--scheme/racket/geiser/eval.rkt6
2 files changed, 15 insertions, 10 deletions
diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el
index f38a4e9..0150772 100644
--- a/elisp/geiser-racket.el
+++ b/elisp/geiser-racket.el
@@ -93,12 +93,19 @@ This function uses `geiser-racket-init-file' if it exists."
(if (re-search-forward
"^\\(?:#lang\\|(module +[^ ]+?\\) +\\([^ ]+?\\|([^)]+)\\) *$" nil t)
(car (geiser-syntax--read-from-string (match-string-no-properties 1)))
- :f)))
-
-(defun geiser-racket--geiser-procedure (proc)
- (if (memq proc '(eval compile))
- `((dynamic-require 'geiser 'geiser:eval) ',(geiser-racket--language))
- `(dynamic-require 'geiser ',(intern (format "geiser:%s" proc)))))
+ "#f")))
+
+(defun geiser-racket--geiser-procedure (proc &rest args)
+ (case proc
+ ((eval compile)
+ (format ",eval %s %s %s"
+ (or (car args) "#f")
+ (geiser-racket--language)
+ (mapconcat 'identity (cdr args) " ")))
+ ((load-file compile-file)
+ (format ",eval geiser/main racket (geiser:%s %s)" proc (car args)))
+ ((no-values) ",no-values")
+ (t (format ",apply geiser:%s (%s)" proc (mapconcat 'identity args " ")))))
(defconst geiser-racket--module-re
"^(module +\\([^ ]+\\)")
diff --git a/scheme/racket/geiser/eval.rkt b/scheme/racket/geiser/eval.rkt
index f2cf39f..4e7f3db 100644
--- a/scheme/racket/geiser/eval.rkt
+++ b/scheme/racket/geiser/eval.rkt
@@ -63,10 +63,8 @@
(define compile-in eval-in)
(define (load-file file)
- (call-with-result
- (lambda ()
- (load-module file (current-output-port) (last-namespace))
- (update-signature-cache file))))
+ (load-module file (current-output-port) (last-namespace))
+ (update-signature-cache file))
(define compile-file load-file)