From ef1bb160c68776e24eb0afaa2c7eb1b7adbd87fb Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 23 Feb 2013 10:27:55 +0100 Subject: [PATCH] ob-python.el: Use a defcustom for two variables. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- lisp/ob-python.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ob-python.el b/lisp/ob-python.el index 02d762cf2..f2806c747 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)