summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorKyle Meyer <meyerkya@gmail.com>2013-07-08 21:33:14 -0400
committerKyle Meyer <meyerkya@gmail.com>2013-07-08 21:33:14 -0400
commitcbe2be56efeafe74c84b8e9f9145baa67f7870d4 (patch)
treec0208a9128750e70833260cbcb3074fc84969bd3 /init
parentb5f8ec7eb76463b5cc15906490dddf6882038603 (diff)
downloademacs.d-cbe2be56efeafe74c84b8e9f9145baa67f7870d4.tar.gz
wrap ipython settings in function
this interferes with org babel session, so I'll only call it when i plan ot use ipython
Diffstat (limited to 'init')
-rw-r--r--init/km-python.el23
1 files changed, 12 insertions, 11 deletions
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"))