diff options
Diffstat (limited to 'lisp/org/ob-clojure.el')
-rw-r--r-- | lisp/org/ob-clojure.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el index bc2bbc0d095..25b39f7f733 100644 --- a/lisp/org/ob-clojure.el +++ b/lisp/org/ob-clojure.el @@ -24,17 +24,17 @@ ;;; Commentary: -;;; support for evaluating clojure code, relies on slime for all eval +;; Support for evaluating clojure code, relies on slime for all eval. ;;; Requirements: -;;; - clojure (at least 1.2.0) -;;; - clojure-mode -;;; - slime +;; - clojure (at least 1.2.0) +;; - clojure-mode +;; - slime -;;; By far, the best way to install these components is by following -;;; the directions as set out by Phil Hagelberg (Technomancy) on the -;;; web page: http://technomancy.us/126 +;; By far, the best way to install these components is by following +;; the directions as set out by Phil Hagelberg (Technomancy) on the +;; web page: http://technomancy.us/126 ;;; Code: (require 'ob) @@ -77,16 +77,16 @@ (require 'slime) (with-temp-buffer (insert (org-babel-expand-body:clojure body params)) - ((lambda (result) - (let ((result-params (cdr (assoc :result-params params)))) - (org-babel-result-cond result-params - result - (condition-case nil (org-babel-script-escape result) - (error result))))) - (slime-eval - `(swank:eval-and-grab-output - ,(buffer-substring-no-properties (point-min) (point-max))) - (cdr (assoc :package params)))))) + (let ((result + (slime-eval + `(swank:eval-and-grab-output + ,(buffer-substring-no-properties (point-min) (point-max))) + (cdr (assoc :package params))))) + (let ((result-params (cdr (assoc :result-params params)))) + (org-babel-result-cond result-params + result + (condition-case nil (org-babel-script-escape result) + (error result))))))) (provide 'ob-clojure) |