summaryrefslogtreecommitdiff
path: root/elisp/geiser-eval.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-08 12:47:42 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-08 12:47:42 +0100
commit3670817dcc482c75105da7965e7306044171b0d9 (patch)
tree3fb71429a72cc7c800bb1fe3f9f434295f48ad10 /elisp/geiser-eval.el
parent0935e89110296b884d06141b5b4386122f18403e (diff)
downloadgeiser-chez-3670817dcc482c75105da7965e7306044171b0d9.tar.gz
geiser-chez-3670817dcc482c75105da7965e7306044171b0d9.tar.bz2
Fixes for Elisp/Scheme translations.
Diffstat (limited to 'elisp/geiser-eval.el')
-rw-r--r--elisp/geiser-eval.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el
index 8466a36..5369a1f 100644
--- a/elisp/geiser-eval.el
+++ b/elisp/geiser-eval.el
@@ -37,16 +37,19 @@
((eq code :f) "#f")
((eq code :t) "#t")
((listp code)
- (cond ((eq (car code) :gs) (concat "((@ (geiser eval) eval-in) (quote "
- (geiser-eval--scheme-str (nth 1 code))
- ") "
- (or (nth 2 code)
- (geiser-eval--buffer-module))
- ")"))
+ (cond ((eq (car code) :gs) (geiser-eval--gs (cdr code)))
((eq (car code) :scm) (cadr code))
(t (concat "(" (mapconcat 'geiser-eval--scheme-str code " ") ")"))))
(t (format "%S" code))))
+(defsubst geiser-eval--gs (code)
+ (concat "((@ (geiser eval) eval-in) (quote "
+ (geiser-eval--scheme-str (nth 0 code))
+ ") (quote "
+ (or (and (nth 1 code)
+ (geiser-eval--scheme-str (nth 1 code)))
+ (geiser-eval--buffer-module))
+ "))"))
;;; Current module: