diff --git a/layers/+lang/python/funcs.el b/layers/+lang/python/funcs.el index e4a26648b..494b97831 100644 --- a/layers/+lang/python/funcs.el +++ b/layers/+lang/python/funcs.el @@ -58,3 +58,9 @@ (pyenv-mode-set version) (message "pyenv: version `%s' is not installed (set by %s)" version file-path)))))) + +(defun spacemacs//disable-semantic-idle-summary-mode () + " Disable semantic-idle-summary in Python mode. +Anaconda provides more useful information but can not do it properly +when this mode is enabled since the minibuffer is cleared all the time." + (semantic-idle-summary-mode 0)) diff --git a/layers/+lang/python/packages.el b/layers/+lang/python/packages.el index 580a115b9..b17b27592 100644 --- a/layers/+lang/python/packages.el +++ b/layers/+lang/python/packages.el @@ -44,7 +44,9 @@ (progn (setq anaconda-mode-installation-directory (concat spacemacs-cache-directory "anaconda-mode")) - (add-hook 'python-mode-hook 'anaconda-mode)) + (add-hook 'python-mode-hook 'anaconda-mode) + (add-hook 'python-mode-hook + 'spacemacs//disable-semantic-idle-summary-mode t)) :config (progn (spacemacs/set-leader-keys-for-major-mode 'python-mode @@ -394,9 +396,6 @@ (defun python/post-init-semantic () (add-hook 'python-mode-hook 'semantic-mode) - (when (configuration-layer/package-usedp 'anaconda-mode) - (add-hook 'python-mode-hook (lambda () (semantic-idle-summary-mode 0)) t)) - (defadvice semantic-python-get-system-include-path (around semantic-python-skip-error-advice activate) "Don't cause error when Semantic cannot retrieve include