summaryrefslogtreecommitdiff
path: root/elisp
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
commitd1d05b74f9b7613cd42c4bcd0173bb617e50647f (patch)
treee50a9b5715358b4c0500ceae7b5b6532117ac163 /elisp
parent35e8b30e2699061c00219de07162e358b389273e (diff)
downloadgeiser-guile-d1d05b74f9b7613cd42c4bcd0173bb617e50647f.tar.gz
geiser-guile-d1d05b74f9b7613cd42c4bcd0173bb617e50647f.tar.bz2
Guile: using the new syntax for sending eval requests
Diffstat (limited to 'elisp')
-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 ()