[Fix #1813] Insert tab in Python REPL

Currently, when tab is pressed, spaces are inserted. It makes Python
REPL unable to recognize code indentation. We must use tab to indent.
Setting indent-tabs-mode is buffer local, so it does not affect its
value in other buffers.
This commit is contained in:
Tu Do 2015-06-02 18:21:34 +07:00 committed by syl20bnr
parent 2aaf3ea6dd
commit 7299cc59b6

View file

@ -152,6 +152,10 @@
python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
(setq python-shell-interpreter "python")))
(defun inferior-python-setup-hook ()
(setq indent-tabs-mode t))
(add-hook 'inferior-python-mode-hook #'inferior-python-setup-hook)
(add-all-to-hook 'python-mode-hook
'python-default
'python-setup-shell))