diff options
author | Bastien Guerry <bzg@altern.org> | 2013-02-23 10:27:55 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-02-23 10:27:55 +0100 |
commit | ef1bb160c68776e24eb0afaa2c7eb1b7adbd87fb (patch) | |
tree | 762034471ba38e362ba7f42d464a16c1c55d2e8c | |
parent | e9e32173ccefec1a2784369488f8850858fc0077 (diff) | |
download | org-mode-ef1bb160c68776e24eb0afaa2c7eb1b7adbd87fb.tar.gz |
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.
-rw-r--r-- | lisp/ob-python.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ob-python.el b/lisp/ob-python.el index 02d762c..f2806c7 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -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) |