diff --git a/custom.el b/custom.el index b257ffa..29ac7e1 100644 --- a/custom.el +++ b/custom.el @@ -9,7 +9,7 @@ '(elpy-eldoc-show-current-function nil) '(package-selected-packages (quote - (cython-mode blacken dired-narrow lua-mode browse-kill-ring clipmon free-keys org-link-minor-mode js2-mode js2-refactor xref-js2 python-django django-mode visual-regexp-steroids pcre2el vimrc-mode iedit transient magit dracula-theme flycheck elpy ein better-defaults ssh-config-mode yaml-mode apache-mode web-mode undo-tree)))) + (cython-mode blacken dired-narrow lua-mode browse-kill-ring clipmon free-keys org-link-minor-mode js2-mode js2-refactor xref-js2 python-django visual-regexp-steroids pcre2el vimrc-mode iedit transient magit dracula-theme flycheck elpy ein better-defaults ssh-config-mode yaml-mode apache-mode web-mode undo-tree)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/init.el b/init.el index cab9f2d..17e674d 100644 --- a/init.el +++ b/init.el @@ -125,6 +125,10 @@ (setq python-shell-interpreter (quote-exe (executable-find "python"))) (setq python-check-command (quote-exe (executable-find "flake8"))) (setq delete-by-moving-to-trash t) + (defun python-shell-interpreter-refresh () + (interactive) + (setq python-shell-interpreter (quote-exe (executable-find "python")))) + (add-hook 'python-django-project-root-hook 'python-shell-interpreter-refresh) )) ;; Linux-specific @@ -169,4 +173,6 @@ (add-hook 'python-mode-hook 'python-mode-keys) (add-hook 'elpy-mode-hook 'blacken-mode) (setq elpy-syntax-check-command python-check-command) + + ;; init.el ends here