diff --git a/CHANGELOG.develop b/CHANGELOG.develop index e297ba4e5..2adf5d85c 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -2363,6 +2363,7 @@ Other: - Make pylookup makefile use correct shell (thanks to Koray Al) - Fix lazy loading of =lsp-python-ms= (thanks to lsp-ableton) - Fix =Ipython= path on windows (thanks to Daniel K) +- Make =inferior-python-mode= do not use tabs (thanks to tsoernes) **** Racket - Restore smart closing paren behavior in racket-mode (thanks to Don March) - Updated racket logo (thanks to Vityou) diff --git a/layers/+lang/python/funcs.el b/layers/+lang/python/funcs.el index d652eba80..cf6a0aeda 100644 --- a/layers/+lang/python/funcs.el +++ b/layers/+lang/python/funcs.el @@ -370,10 +370,6 @@ Bind formatter to '==' for LSP and '='for all other backends." ;; REPL -(defun spacemacs//inferior-python-setup-hook () - "Setup REPL for python inferior process buffer." - (setq indent-tabs-mode t)) - (defun spacemacs/python-shell-send-buffer-switch () "Send buffer content to shell and switch to it in insert mode." (interactive) @@ -464,3 +460,11 @@ Bind formatter to '==' for LSP and '='for all other backends." (when (version< emacs-version "25") (advice-add 'wisent-python-default-setup :after #'spacemacs//python-imenu-create-index-use-semantic-maybe)) + +(defun spacemacs//bind-python-repl-keys () + "Bind the keys for testing in Python." + (spacemacs/declare-prefix-for-mode 'inferior-python-mode "mv" "virtualenv") + (spacemacs/set-leader-keys-for-major-mode 'inferior-python-mode + "c" 'comint-clear-buffer + "r" 'pyvenv-restart-python + "vw" 'pyvenv-workon)) diff --git a/layers/+lang/python/packages.el b/layers/+lang/python/packages.el index 2d6f61da2..0534d9ff4 100644 --- a/layers/+lang/python/packages.el +++ b/layers/+lang/python/packages.el @@ -309,8 +309,7 @@ (progn (spacemacs/register-repl 'python 'spacemacs/python-start-or-switch-repl "python") - (add-hook 'inferior-python-mode-hook - 'spacemacs//inferior-python-setup-hook) + (spacemacs//bind-python-repl-keys) (spacemacs/add-to-hook 'python-mode-hook '(spacemacs//python-setup-backend spacemacs//python-default))