diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-13 23:29:41 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-13 23:29:41 +0200 |
commit | 2aa7c34bb55d5bc6f9d9fe8fce2f0d7eb978ec70 (patch) | |
tree | a4ae63696e751d936f5811a1722243136454be76 | |
parent | a57a93e3f664670d2fe493cffe4f4f05ad66e243 (diff) | |
download | org-mode-2aa7c34bb55d5bc6f9d9fe8fce2f0d7eb978ec70.tar.gz |
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.
-rw-r--r-- | lisp/ob-lisp.el | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/ob-lisp.el b/lisp/ob-lisp.el index a14e9e5..1e781ff 100644 --- a/lisp/ob-lisp.el +++ b/lisp/ob-lisp.el @@ -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))) |