summaryrefslogtreecommitdiff
path: root/lisp/ob-emacs-lisp.el
diff options
context:
space:
mode:
authorS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:27 +0200
committerS├ębastien Delafond <sdelafond@gmail.com>2014-07-13 13:35:27 +0200
commite32a45ed36d6000db4b39171149072d11b77af72 (patch)
treeb5f4a7d43022c08c3298e82b3e9fc50f68be660f /lisp/ob-emacs-lisp.el
parent7697fa4daf3ec84f85711a84035d8f0224afd4e3 (diff)
Imported Upstream version 8.0.7
Diffstat (limited to 'lisp/ob-emacs-lisp.el')
-rw-r--r--lisp/ob-emacs-lisp.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ob-emacs-lisp.el b/lisp/ob-emacs-lisp.el
index d83ca24..886645d 100644
--- a/lisp/ob-emacs-lisp.el
+++ b/lisp/ob-emacs-lisp.el
@@ -1,6 +1,6 @@
;;; ob-emacs-lisp.el --- org-babel functions for emacs-lisp code evaluation
-;; Copyright (C) 2009-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2013 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
@@ -27,7 +27,6 @@
;;; Code:
(require 'ob)
-(eval-when-compile (require 'ob-comint))
(defvar org-babel-default-header-args:emacs-lisp
'((:hlines . "yes") (:colnames . "no"))
@@ -56,11 +55,13 @@
"Execute a block of emacs-lisp code with Babel."
(save-window-excursion
((lambda (result)
- (if (or (member "scalar" (cdr (assoc :result-params params)))
- (member "verbatim" (cdr (assoc :result-params params))))
- (let ((print-level nil)
- (print-length nil))
- (format "%S" result))
+ (org-babel-result-cond (cdr (assoc :result-params params))
+ (let ((print-level nil)
+ (print-length nil))
+ (if (or (member "scalar" (cdr (assoc :result-params params)))
+ (member "verbatim" (cdr (assoc :result-params params))))
+ (format "%S" result)
+ (format "%s" result)))
(org-babel-reassemble-table
result
(org-babel-pick-name (cdr (assoc :colname-names params))