ob-python.el: Use a defcustom for two variables.

* ob-python.el (org-babel-python-command): Use a defcustom.
(org-babel-python-mode): Use a defcustom and default to
'python-mode when featured.

Thanks to Andreas Röhler for providing a prelimiary patch.
This commit is contained in:
Bastien Guerry 2013-02-23 10:27:55 +01:00
parent e9e32173cc
commit ef1bb160c6
1 changed files with 11 additions and 4 deletions

View File

@ -40,12 +40,19 @@
(defvar org-babel-default-header-args:python '())
(defvar org-babel-python-command "python"
"Name of the command for executing Python code.")
(defcustom org-babel-python-command "python"
"Name of the command for executing Python code."
:group 'org-babel
:version "24.3"
:type 'string)
(defvar org-babel-python-mode (if (featurep 'xemacs) 'python-mode 'python)
(defcustom org-babel-python-mode
(if (or (featurep 'xemacs) (featurep 'python-mode)) 'python-mode 'python)
"Preferred python mode for use in running python interactively.
This will typically be either 'python or 'python-mode.")
This will typically be either 'python or 'python-mode."
:group 'org-babel
:version "24.3"
:type 'function)
(defvar org-src-preserve-indentation)