summaryrefslogtreecommitdiff
path: root/elisp/geiser-eval.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-eval.el')
-rw-r--r--elisp/geiser-eval.el38
1 files changed, 19 insertions, 19 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el
index 3e0d0d9..1c8cbfe 100644
--- a/elisp/geiser-eval.el
+++ b/elisp/geiser-eval.el
@@ -54,25 +54,6 @@ EVAL, COMPILE, LOAD-FILE and COMPILE-FILE should be supported."))
;;; Code formatting:
-(defun geiser-eval--scheme-str (code)
- (cond ((null code) "'()")
- ((eq code :f) "#f")
- ((eq code :t) "#t")
- ((listp code)
- (cond ((eq (car code) :eval) (geiser-eval--eval (cdr code)))
- ((eq (car code) :comp) (geiser-eval--comp (cdr code)))
- ((eq (car code) :load-file)
- (geiser-eval--load-file (cadr code)))
- ((eq (car code) :comp-file)
- (geiser-eval--comp-file (cadr code)))
- ((eq (car code) :module) (geiser-eval--module (cadr code)))
- ((eq (car code) :ge) (geiser-eval--ge (cadr code)))
- ((eq (car code) :scm) (cadr code))
- (t (concat "("
- (mapconcat 'geiser-eval--scheme-str code " ") ")"))))
- ((symbolp code) (format "%s" code))
- (t (format "%S" code))))
-
(defsubst geiser-eval--eval (code)
(geiser-eval--scheme-str
`(,(geiser-eval--form 'eval) (quote ,(nth 0 code))
@@ -99,6 +80,25 @@ EVAL, COMPILE, LOAD-FILE and COMPILE-FILE should be supported."))
(defsubst geiser-eval--ge (proc)
(geiser-eval--scheme-str (geiser-eval--form proc)))
+(defun geiser-eval--scheme-str (code)
+ (cond ((null code) "'()")
+ ((eq code :f) "#f")
+ ((eq code :t) "#t")
+ ((listp code)
+ (cond ((eq (car code) :eval) (geiser-eval--eval (cdr code)))
+ ((eq (car code) :comp) (geiser-eval--comp (cdr code)))
+ ((eq (car code) :load-file)
+ (geiser-eval--load-file (cadr code)))
+ ((eq (car code) :comp-file)
+ (geiser-eval--comp-file (cadr code)))
+ ((eq (car code) :module) (geiser-eval--module (cadr code)))
+ ((eq (car code) :ge) (geiser-eval--ge (cadr code)))
+ ((eq (car code) :scm) (cadr code))
+ (t (concat "("
+ (mapconcat 'geiser-eval--scheme-str code " ") ")"))))
+ ((symbolp code) (format "%s" code))
+ (t (format "%S" code))))
+
;;; Code sending: