summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-06-20 22:12:02 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-06-20 22:12:02 +0200
commitf8eb0b30ea4c62861d2d82c6d6ed0b9826201855 (patch)
tree73edc36f65b486601e8c944cce85eacc3a61f42a
parent47fdeb1f48703eb1437c306684280c2227492893 (diff)
downloadorg-mode-f8eb0b30ea4c62861d2d82c6d6ed0b9826201855.tar.gz
ob-shell: Fix "wrong type sequencep: function" error
* lisp/ob-shell.el (org-babel-shell-names): Fix error introduced when switching to lexical binding.
-rw-r--r--lisp/ob-shell.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/ob-shell.el b/lisp/ob-shell.el
index 7a90ea2..490d15e 100644
--- a/lisp/ob-shell.el
+++ b/lisp/ob-shell.el
@@ -44,17 +44,16 @@
'("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh")
"List of names of shell supported by babel shell code blocks."
:group 'org-babel
- :type 'string
- :initialize
- (lambda (symbol value)
- (set-default symbol (second value))
- (mapc
- (lambda (name)
- (eval `(defun ,(intern (concat "org-babel-execute:" name)) (body params)
- ,(format "Execute a block of %s commands with Babel." name)
- (let ((shell-file-name ,name))
- (org-babel-execute:shell body params)))))
- (second value))))
+ :type '(repeat (string :tag "Shell name: "))
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ (dolist (name value)
+ (eval `(defun ,(intern (concat "org-babel-execute:" name))
+ (body params)
+ ,(format "Execute a block of %s commands with Babel." name)
+ (let ((shell-file-name ,name))
+ (org-babel-execute:shell body params)))
+ t))))
(defun org-babel-execute:shell (body params)
"Execute a block of Shell commands with Babel.