summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-30 04:58:57 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-30 04:58:57 +0200
commit25efa35db669a3994fc1a4df7462633adfb6941d (patch)
treead6e18692fbfe204b07da4e1b010badb041b2c84
parent89e1f6444208bc70deeeca765f212296ed11c634 (diff)
downloadgeiser-guile-25efa35db669a3994fc1a4df7462633adfb6941d.tar.gz
geiser-guile-25efa35db669a3994fc1a4df7462633adfb6941d.tar.bz2
Guile: using the new syntax for sending eval requests
-rw-r--r--elisp/geiser-guile.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index e6cf8f1..3e1c03f 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -114,9 +114,16 @@ This function uses `geiser-guile-init-file' if it exists."
;;; Evaluation support:
-(defun geiser-guile--geiser-procedure (proc)
- (let ((proc (intern (format "ge:%s" (if (eq proc 'eval) 'compile proc)))))
- `(@ (geiser emacs) ,proc)))
+(defun geiser-guile--geiser-procedure (proc &rest args)
+ (case proc
+ ((eval compile) (format "((@ (geiser emacs) ge:compile) '%s '%s)"
+ (mapconcat 'identity (cdr args) " ")
+ (or (car args) "#f")))
+ ((load-file compile-file)
+ (format "((@ (geiser emacs) ge:%s) %s)" proc (car args)))
+ ((no-values) "((@ (guile) values))")
+ (t (format "(apply (@ (geiser emacs) ge:%s) (list %s))"
+ proc (mapconcat 'identity args "")))))
(defconst geiser-guile--module-re
"(define-module +\\(([^)]+)\\)")
@@ -205,7 +212,7 @@ This function uses `geiser-guile-init-file' if it exists."
(if (file-name-absolute-p file) file
(or (gethash file geiser-guile--file-cache)
(puthash file
- (geiser-eval--send/result `(:eval ((:ge find-file) ,file)))
+ (geiser-eval--send/result `(:eval (:ge find-file ,file)))
geiser-guile--file-cache)))))
(defun geiser-guile--resolve-file-x ()