summaryrefslogtreecommitdiffstats
path: root/Misc/python-mode.el
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1999-08-10 21:49:00 (GMT)
committerBarry Warsaw <barry@python.org>1999-08-10 21:49:00 (GMT)
commit50765abb29cb3a124c1696a8f29c69db267eb624 (patch)
treebb2c3a7f42d7625108adbb059f3fcf26266ac6cd /Misc/python-mode.el
parentabc2f960d4f38832436db1449bc64803380d55bf (diff)
downloadcpython-50765abb29cb3a124c1696a8f29c69db267eb624.zip
cpython-50765abb29cb3a124c1696a8f29c69db267eb624.tar.gz
cpython-50765abb29cb3a124c1696a8f29c69db267eb624.tar.bz2
(py-shell): Set the default shell if not set yet. It's sometimes
convenient to call py-shell before the first Python file has been visited.
Diffstat (limited to 'Misc/python-mode.el')
-rw-r--r--Misc/python-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index d7818f1..0dbf202 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -1207,6 +1207,9 @@ interaction between undo and process filters; the same problem exists in
non-Python process buffers using the default (Emacs-supplied) process
filter."
(interactive "P")
+ ;; Set the default shell if not already set
+ (when (null py-which-shell)
+ (py-toggle-shells py-default-interpreter))
(let ((args py-which-args))
(when (and argprompt
(interactive-p)