ob-clojure: fixed error message when clojure binary is not found

* lisp/ob-clojure.el (org-babel-clojure-babel-clojure-cmd): fixed
  error message when clojure binary is not found
This commit is contained in:
Eric Schulte 2010-10-25 11:12:49 -06:00
parent 25d365a373
commit 62dbf404f5
1 changed files with 21 additions and 21 deletions

View File

@ -91,28 +91,28 @@
(defvar swank-clojure-extra-classpaths) (defvar swank-clojure-extra-classpaths)
(defun org-babel-clojure-babel-clojure-cmd () (defun org-babel-clojure-babel-clojure-cmd ()
"Create the command to start clojure according to current settings." "Create the command to start clojure according to current settings."
(if (and (not swank-clojure-binary) (not swank-clojure-classpath)) (or (when swank-clojure-binary
(if (listp swank-clojure-binary)
swank-clojure-binary
(list swank-clojure-binary)))
(when swank-clojure-classpath
(delq
nil
(append
(list swank-clojure-java-path)
swank-clojure-extra-vm-args
(list
(when swank-clojure-library-paths
(concat "-Djava.library.path="
(swank-clojure-concat-paths swank-clojure-library-paths)))
"-classpath"
(swank-clojure-concat-paths
(append
swank-clojure-classpath
swank-clojure-extra-classpaths))
"clojure.main"))))
(error "%s" (concat "You must specifiy either a `swank-clojure-binary' " (error "%s" (concat "You must specifiy either a `swank-clojure-binary' "
"or a `swank-clojure-jar-path'")) "or a `swank-clojure-classpath'"))))
(if swank-clojure-binary
(if (listp swank-clojure-binary)
swank-clojure-binary
(list swank-clojure-binary))
(delq
nil
(append
(list swank-clojure-java-path)
swank-clojure-extra-vm-args
(list
(when swank-clojure-library-paths
(concat "-Djava.library.path="
(swank-clojure-concat-paths swank-clojure-library-paths)))
"-classpath"
(swank-clojure-concat-paths
(append
swank-clojure-classpath
swank-clojure-extra-classpaths))
"clojure.main"))))))
(defun org-babel-clojure-table-or-string (results) (defun org-babel-clojure-table-or-string (results)
"Convert RESULTS to an elisp value. "Convert RESULTS to an elisp value.