diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-04-12 00:57:23 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-04-12 00:57:23 +0200 |
commit | 7a666d1e2da690ab45a2f40d388e47df711e4868 (patch) | |
tree | 3a6daf728702b7b6448b858e1f509961aef44bec /elisp/geiser-eval.el | |
parent | 2ebc1225b929d2a3c3b25fbd7596adb4d49915f0 (diff) | |
download | geiser-guile-7a666d1e2da690ab45a2f40d388e47df711e4868.tar.gz geiser-guile-7a666d1e2da690ab45a2f40d388e47df711e4868.tar.bz2 |
Simplifications to previous patch
Diffstat (limited to 'elisp/geiser-eval.el')
-rw-r--r-- | elisp/geiser-eval.el | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el index 5d61580..28da110 100644 --- a/elisp/geiser-eval.el +++ b/elisp/geiser-eval.el @@ -1,6 +1,6 @@ ;;; geiser-eval.el -- sending scheme code for evaluation -;; Copyright (C) 2009, 2010, 2011, 2012 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -167,21 +167,13 @@ module-exports, autodoc, callers, callees and generic-methods.") (let ((values (cdr (assoc 'result ret)))) (car (geiser-syntax--read-from-string (car values))))) -(defun geiser-eval--retort-result-str (ret) - (let ((values (cdr (assoc 'result ret)))) +(defun geiser-eval--retort-result-str (ret prefix) + (let* ((prefix (or prefix "=> ")) + (nlprefix (concat "\n" prefix)) + (values (cdr (assoc 'result ret)))) (if values - (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")) + (concat prefix (mapconcat 'identity values nlprefix)) + (or prefix "(No value)")))) (defsubst geiser-eval--retort-output (ret) (cdr (assoc 'output ret))) (defsubst geiser-eval--retort-error (ret) (cdr (assoc 'error ret))) |