summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-chicken.el10
-rw-r--r--scheme/chicken/geiser/emacs.scm6
2 files changed, 12 insertions, 4 deletions
diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index d5cda6d..6e7d1bf 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -268,7 +268,15 @@ This function uses `geiser-chicken-init-file' if it exists."
(let ((geiser-log-verbose-p t)
(geiser-chicken-load-file (expand-file-name "chicken/geiser/emacs.scm" geiser-scheme-dir)))
(if geiser-chicken-compile-geiser-p
- (geiser-eval--send/wait (format "(use utils)(compile-file \"%s\")(import geiser)"
+ (geiser-eval--send/wait (format "
+;; Sadly, (use import compile-file) must be run at top-level, so we have a stdout binding
+(define geiser-stdout (current-output-port))
+(current-output-port (make-output-port (lambda a #f) (lambda a #f)))
+(use utils)
+(compile-file \"%s\")
+(import geiser)
+(current-output-port geiser-stdout)
+"
geiser-chicken-load-file))
(geiser-eval--send/wait (format "(load \"%s\")"
geiser-chicken-load-file)))))
diff --git a/scheme/chicken/geiser/emacs.scm b/scheme/chicken/geiser/emacs.scm
index 47e4418..cddf8da 100644
--- a/scheme/chicken/geiser/emacs.scm
+++ b/scheme/chicken/geiser/emacs.scm
@@ -229,7 +229,7 @@
(string-append "^([^#]+#)*" (regexp-escape prefix)))
(define (describe-symbol sym #!key (exact? #f))
- (let* ((str (symbol->string sym))
+ (let* ((str (->string sym))
(found (apropos-information-list (regexp (make-apropos-regex str)) #:macros? #t)))
(delete-duplicates
(if exact?
@@ -339,7 +339,7 @@
;; Builds a signature list from an identifier
(define (find-signatures toplevel-module sym)
- (define str (symbol->string sym))
+ (define str (->string sym))
(define (make-module-list sym module-sym)
(if (null? module-sym)
@@ -375,7 +375,7 @@
(args (if (or (list? rest) (pair? rest)) (cdr rest) '())))
(define (clean-arg arg)
- (string->symbol (string-substitute "(.*[^0-9]+)[0-9]+" "\\1" (symbol->string arg))))
+ (string->symbol (string-substitute "(.*[^0-9]+)[0-9]+" "\\1" (->string arg))))
(define (collect-args args #!key (reqs? #t) (opts? #f) (keys? #f))
(when (not (null? args))