ob-lisp: Fix error when evaluating a lisp src-block

* lisp/ob-lisp.el (org-babel-lisp-eval-fn): Change values to functions
  instead of strings.
(org-babel-execute:lisp): Apply change.
This commit is contained in:
Nicolas Goaziou 2016-04-13 23:29:41 +02:00
parent a57a93e3f6
commit 2aa7c34bb5

View file

@ -38,15 +38,6 @@
;;; Code:
(require 'ob)
(defcustom org-babel-lisp-eval-fn "slime-eval"
"The function to be called to evaluate code on the Lisp side.
It can be set to either \"sly-eval\" or \"slime-eval\"."
:group 'org-babel
:version "25.1"
:package-version '(Org . "9.0")
:options '("sly-eval" "slime-eval")
:type 'stringp)
(declare-function sly-eval "ext:sly" (sexp &optional package))
(declare-function slime-eval "ext:slime" (sexp &optional package))
@ -56,6 +47,14 @@ It can be set to either \"sly-eval\" or \"slime-eval\"."
(defvar org-babel-default-header-args:lisp '())
(defvar org-babel-header-args:lisp '((package . :any)))
(defcustom org-babel-lisp-eval-fn #'slime-eval
"The function to be called to evaluate code on the Lisp side.
Valid values include `slime-eval' and `sly-eval'."
:group 'org-babel
:version "25.1"
:package-version '(Org . "9.0")
:type 'function)
(defcustom org-babel-lisp-dir-fmt
"(let ((*default-pathname-defaults* #P%S\n)) %%s\n)"
"Format string used to wrap code bodies to set the current directory.
@ -89,8 +88,8 @@ current directory string."
BODY is the contents of the block, as a string. PARAMS is
a property list containing the parameters of the block."
(require (pcase org-babel-lisp-eval-fn
("slime-eval" 'slime)
("sly-eval" 'sly)))
(`slime-eval 'slime)
(`sly-eval 'sly)))
(org-babel-reassemble-table
(let ((result
(funcall (if (member "output" (cdr (assoc :result-params params)))