From cbe2be56efeafe74c84b8e9f9145baa67f7870d4 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 8 Jul 2013 21:33:14 -0400 Subject: wrap ipython settings in function this interferes with org babel session, so I'll only call it when i plan ot use ipython --- init/km-python.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'init/km-python.el') diff --git a/init/km-python.el b/init/km-python.el index 8d5271a..2463ee5 100644 --- a/init/km-python.el +++ b/init/km-python.el @@ -1,12 +1,13 @@ ;; http://www.emacswiki.org/emacs/PythonProgrammingInEmacs#toc5 -(setq - python-shell-interpreter "ipython" - python-shell-interpreter-args "" - python-shell-prompt-regexp "In \\[[0-9]+\\]: " - python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " - python-shell-completion-setup-code - "from IPython.core.completerlib import module_completion" - python-shell-completion-module-string-code - "';'.join(module_completion('''%s'''))\n" - python-shell-completion-string-code - "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") +(defun km/setup-ipython-shell () + (setq + python-shell-interpreter "ipython" + python-shell-interpreter-args "" + python-shell-prompt-regexp "In \\[[0-9]+\\]: " + python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " + python-shell-completion-setup-code + "from IPython.core.completerlib import module_completion" + python-shell-completion-module-string-code + "';'.join(module_completion('''%s'''))\n" + python-shell-completion-string-code + "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")) -- cgit v1.2.3