summaryrefslogtreecommitdiff
path: root/elisp/geiser-eval.el
diff options
context:
space:
mode:
authorDiogo F. S. Ramos <diogofsr@gmail.com>2013-04-11 18:56:30 -0300
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-04-12 00:17:00 +0200
commit2ebc1225b929d2a3c3b25fbd7596adb4d49915f0 (patch)
tree1c052ad067b05d3d17a0943699a9a61faecd48e6 /elisp/geiser-eval.el
parent246175eadf22a2ab7121be68d37d01f320ddb44a (diff)
downloadgeiser-guile-2ebc1225b929d2a3c3b25fbd7596adb4d49915f0.tar.gz
geiser-guile-2ebc1225b929d2a3c3b25fbd7596adb4d49915f0.tar.bz2
Evaluate last expression to buffer with a prefix
Use a prefix before pressing C-x C-e to print the result of evaluating the expression before mark to the current buffer.
Diffstat (limited to 'elisp/geiser-eval.el')
-rw-r--r--elisp/geiser-eval.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el
index dd0e45d..5d61580 100644
--- a/elisp/geiser-eval.el
+++ b/elisp/geiser-eval.el
@@ -173,6 +173,16 @@ module-exports, autodoc, callers, callees and generic-methods.")
(concat "=> " (mapconcat 'identity values "\n=> "))
"(No value)")))
+(defun geiser-eval--retort-result-list (ret)
+ "Return the list of results."
+ (cdr (assoc 'result ret)))
+
+(defun geiser-eval--retort-result-to-buffer (ret)
+ "Return a string formated for printing to buffer."
+ (mapconcat 'identity
+ (geiser-eval--retort-result-list ret)
+ "\n"))
+
(defsubst geiser-eval--retort-output (ret) (cdr (assoc 'output ret)))
(defsubst geiser-eval--retort-error (ret) (cdr (assoc 'error ret)))